• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Day light support in JAVA

 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ALL,

I looked at the below link for daylight support for java on sun site.

http://java.sun.com/developer/technicalArticles/Intl/USDST/

How do I test it. Has anyone done this before. I have downloaded the tool that is mentioned on the above site.
I ran the validation. everything looks good. But How do I verify that It works?

Any pointers appreciated.

Thanks,
Trupti
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The same way you determine whether anything works.

1. Determine the requirements, i.e. figure out what things it is supposed to do.

2. Write test code that tries to make it do those things.

3. Run that test code.

4. See if it did those things as expected and report whether it did.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The new DST rules specify march 11th (instead of april 2nd) as the day the clock should be changed (similarly november 4th instead of october 29th).

One way to check this is to write a program that prints the current time. Then update the date to march 10th, check the time to verify. Change the date again to march 11th and check that the time has changed in accordance to DST.
 
trupti nigam
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rachil Chandran:
The new DST rules specify march 11th (instead of april 2nd) as the day the clock should be changed (similarly november 4th instead of october 29th).

One way to check this is to write a program that prints the current time. Then update the date to march 10th, check the time to verify. Change the date again to march 11th and check that the time has changed in accordance to DST.




That is what I did and tested a simple program. I user jre 1.3.13 and jre 1.5 with updated TZ DB. But I do not see any date changes.

Thanks,
Trupti
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by trupti nigam:



That is what I did and tested a simple program. I user jre 1.3.13 and jre 1.5 with updated TZ DB. But I do not see any date changes.

Thanks,
Trupti



Trupti,
Is the time zone of your test machine set to the time zone you want to test, or did you define the time zone in your test program?

The Novell support site has a nice test that shows if a Daylight Saving offset change occurs at a particular moment.

It uses the time zone database of the java runtime that's running the program.
You pass the timezone, and a date. The test tells wether a DST change occurs at that date.

Regards, Jan
[ January 29, 2007: Message edited by: Jan Cumps ]
 
trupti nigam
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jan Cumps:


Trupti,
Is the time zone of your test machine set to the time zone you want to test, or did you define the time zone in your test program?

The Novell support site has a nice test that shows if a Daylight Saving offset change occurs at a particular moment.

It uses the time zone database of the java runtime that's running the program.
You pass the timezone, and a date. The test tells wether a DST change occurs at that date.

Regards, Jan

[ January 29, 2007: Message edited by: Jan Cumps ]




Thanks Jan.
The code did work this time.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic