• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Day light support in JAVA

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • 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
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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.
 
Rachil Chandran
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • 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: 627
  • Mark post as helpful
  • send pies
  • 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
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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: 627
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic