Hi, Dan,

You're dealing with a Daylight Savings Time problem. I haven't tried to keep up with Java's calendar routines over the last few months, but if you go to the page on the US Naval Observatory web site that describes clock changes at:

   http://aa.usno.navy.mil/faq/docs/daylight_time.html

...the first paragraph says:

     Currently, daylight time begins in the United States
     on the first Sunday in April and ends on the last
     Sunday in October. On the first Sunday in April,
     clocks are set ahead one hour at 2:00 a.m. local
     standard time, which becomes 3:00 a.m. local
     daylight time. On the last Sunday in October, clocks
     are set back one hour at 2:00 a.m. local daylight
     time, which becomes 1:00 a.m. local standard time.
     These dates were recently modified with the
     passage of the Energy Policy Act of 2005, Pub. L.
     no. 109-58, 119 Stat 594 (2005). Starting in
     March 2007, daylight time in the United States
     will begin on the second Sunday in March and end
     on the first Sunday in November.

...and therein lies your problem.

As for a workaround, I'm not sure what to suggest. However, I thought that the later JVMs had adapted to the change in law.

Regards,
Jerry

On Dec 18, 2006, at 8:31 PM, Dan Faber wrote:

Hi everyone:

I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March, and the NSTimestamp is giving us back a time that is one hour earlier than the time that is designated. This occurs between March 11 and March 31, 2007, a 3 week period. The problem does not seem to occur for dates before that period or afterwards. It does not appear to be an NSTimestampFormatter problem, as it exists with or without using the formatter.

The time is correct in the database after a save, but it immediately gets displayed an hour early. The problem occurs with two different versions of the mysql-connector (including the most recent). It occurs on two different machines, both running OSX version 10.4.8.

Converting the date to java.util.GregorianCalendar appears to produce the correct result for java.util.GregorianCalendar.HOUR_OF_DAY.

So far I have not seen anything on the list about this. Anyone have any ideas what's up?

Dan Faber
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jerrywwalker% 40gmail.com

This email sent to [EMAIL PROTECTED]


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to