Jim,

Do you know which, if any, Apple updates have the required file?

Thanks,
Ken

On Dec 18, 2006, at 10:43 PM, James Stead wrote:

Hi,

I've been working on this problem at a client recently. Pre-1.4 jvm's kept the timezone data as a structure inside a java class, and 1.4+ jvm's keep the data in the Olson TimeZoneInfo database http://www.twinsun.com/tz/tz-link.htm. To patch the pre-1.4s the class file must be replaced. To patch the post 1.4s the database (a filesystem based structure) must be replaced.

Either may be handled by updating your jdk to a version that has the update. Alternatively you can patch *only* the date functionality. To do so for post 1.4, try the tzupdater by Sun http://java.sun.com/javase/tzupdater_README.html. Prior jdk's require a modification to the class file. For example, to patch a 1.1.8 version used by WO 4.5 it is possible to decompile the class in classes.zip, fix the dst start/end dates, and recompile.

Thanks.
Jim


On Dec 18, 2006, at 10:10 PM, Ken Anderson wrote:

Chuck,

The distinction here is that DST is actually starting at a new time in 2007 (a few weeks earlier than it used to) and there's a lot of fuss about what JVM's are handling it correctly.

Ken

On Dec 18, 2006, at 10:05 PM, Chuck Hill wrote:

On Dec 18, 2006, at 6:45 PM, Jerry W. Walker wrote:

Hi, Dan,

You're dealing with a Daylight Savings Time problem.

Yes, the notorious One Hour Shift.


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.

I think that is exactly the problem. We are not in DST now, but late March will be. Java is very "accurate" WRT time and does not handle it as we would in day to day life. 9AM March 21 is not exactly N x 24 hours away, it is N x 24 +/- 1 depending on which way you are crossing the DST boundary. If you have dates at midnight, even the date will change! Much fin ensues. If you don't need the time, setting it to noon will avoid the date shift. That is of no use to you. You can use different formatters (with the time zone set differently) for dates in and out of DST. You could also store the date (at noon) in one field and the in another.

Java. Dates. If there is a hell on earth for developers, it is this.


Chuck

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/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
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/lists% 40anderhome.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
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/jimstead% 40mac.com

This email sent to [EMAIL PROTECTED]


James E. Stead
407.252.3321
[EMAIL PROTECTED]



 _______________________________________________
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