Bug ID 6342679: NSTimestamp Happy New Year Bug
Bug ID 6342679: NSTimestamp Happy New Year Bug
- Subject: Bug ID 6342679: NSTimestamp Happy New Year Bug
- From: Barði Einarsson <email@hidden>
- Date: Thu, 8 Jan 2009 09:59:20 -0000
- Thread-topic: Bug ID 6342679: NSTimestamp Happy New Year Bug
Bug ID 6342679: NSTimestamp Happy New Year Bug
I think that I am being stonewalled.
I have had this bug reopened once.
I do not believe that this bug has to do with
timezones at all.
Even so
UTC and GMT are effectively the same. Not?
Comments please.
Best regards,
Bardi
-----Original Message-----
From: email@hidden [mailto:email@hidden]
Sent: Wed 07-Jan-09 23:59
To: Barði Einarsson
Subject: Bug ID 6342679: NSTimestamp Happy New Year Bug
Hi Bardi,
This is a follow-up to Bug ID# 6342679.
Engineering has determined that this issue behaves as intended based
on the following information:
This is the correct behavior. Java Date and NSTimestamp is one of
those, do not include time zone information so the Java Gregorian
Calendar do not try to use any time zone from the Date subclasses. It
is clearly written in the NSTimestamp documentation that all time
stamp and UTC based. The time zone in the NSTimestamp constructor is
only used as a convenience, and it is not part of the class storage.
Again, all NSTimestamp are UTC. This means that when used in
conjunction with GregorianCalendar, the time zone must be set to the
desired one.
We consider this issue closed. If you have any questions or concern
regarding this issue, please update your report directly (http://bugreport.apple.com
).
Thank you for taking the time to notify us of this issue.
Best Regards,
Kit Cheung
Apple Developer Connection
Worldwide Developer Relations
**************************************************************************
THE INFORMATION CONTAINED IN THIS MESSAGE IS UNDER NON-DISCLOSURE
**************************************************************************
-------------------------------------------------------
Bug ID #: 6342679
Bug Title: NSTimestamp Happy New Year Bug
-------------------------------------------------------
<GMT04-Nov-2008 16:56:50GMT> Bardi Einarsson:
public static int yearFromDate(NSTimestamp date) {
if (null == date) {
return NOT_APPLICABLE;
}
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(date);
System.out.println("date in yearFromDate : " + date);
int result = cal.get(GregorianCalendar.YEAR);
System.out.println("yearFromDate : " + result);
return result;
}
date in yearFromDate : 1964-01-01 00:00:00 Etc/GMT
yearFromDate : 1963
<GMT23-Dec-2008 11:34:35GMT> Bardi Einarsson:
Behaves correctly - no way
The time zone of the computers running the code is GMT.
The behavior of the code changes depending on the year.
Even if the given work-around were correct the documentation /
javadoc for NSTimestamp would have to be rewritten.
NSTimestamp reports a timezone which is not used by GregorianCalendar ??
This is a difficult bug.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden