Do we need java 1.5.0_06 on Mac OS X to correct this issue?

Or Apple have already a version of java 1.4.2_xx fully DST compatible?

Thanks


On 07-01-26, at 22:30, David den Boer wrote:

What you have there is fully DST compatible, if you do not use NSTimestamp :-)

That being said, if you avoid using timezones with NSTimestamp, and do not use the time-component constructor :

NSTimestamp(int year, int month, int date, int hour, int minute, int second, TimeZone tz)


then you are good. If you need that one, then try :

        /**
* Creates a new NSTimestamp using the passed in components and timezone info.
         */
public static NSTimestamp timestampForComponents(int iYear, int iMonth, int iDay, int iHours, int iMinutes, int iSeconds, TimeZone iZone) { GregorianCalendar aCal = new GregorianCalendar(iYear, iMonth, iDay, iHours, iMinutes, iSeconds);
                if (iZone != null)
                        aCal.setTimeZone(iZone);
                return new NSTimestamp(aCal.getTime());
        }

OR to change timezone on an existing date :


        /**
         * Returns a new time stamp for the passed in Timezone.
         *
         * @param iMillis time stamp to be converted
         * @param iZone Timzone in which conversion is needed.
         * @return an NSTimestamp with date converted to iZone.
         */
public static NSTimestamp changeDateForTimezone(long iMillis, TimeZone iZone) {
                long anOffset = 0l;
                if (iZone != null)
                        anOffset = iZone.getOffset(iMillis);
                return new NSTimestamp(iMillis + anOffset);
        }       
public static NSTimestamp changeDateForTimezone(NSTimestamp iTimestamp, TimeZone iZone) {
                return changeDateForTimezone(iTimestamp.getTime(), iZone);
        }       



On Jan 26, 2007, at 2:45 PM, Ken Anderson wrote:

Is there a reasonable solution for this yet? I'm running java 1.5.0_06, which sun claims is compatible with the new daylight saving time change, but it is not. How can I get this fixed? I'm on OS X 10.4.8.

Ken

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

This email sent to [EMAIL PROTECTED]

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

This email sent to [email protected]

Reply via email to