• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimestamp bug in timestampByAddingGregorianUnits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimestamp bug in timestampByAddingGregorianUnits


  • Subject: NSTimestamp bug in timestampByAddingGregorianUnits
  • From: Ramsey Gurley <email@hidden>
  • Date: Wed, 7 Oct 2009 16:13:08 -0400

Hi all,

Executing the following code with a default time zone of US Eastern time

NSTimestamp ts1 = new NSTimestamp(2009,11,1,0,0,0,NSTimeZone.defaultTimeZone());
NSTimestamp ts2 = ts1.timestampByAddingGregorianUnits( 0, 0, 1, 0, 0, 0 );
NSTimestamp ts3 = new NSTimestamp(2009,11,2,0,0,0,NSTimeZone.defaultTimeZone());
System.out.println(NSTimeZone.defaultTimeZone().getID());
System.out.println(ts1 + "\n" + ts2 + "\n" + ts3);

produces the following result :-/

America/New_York
2009-11-01 04:00:00 Etc/GMT
2009-11-02 04:00:00 Etc/GMT
2009-11-02 05:00:00 Etc/GMT

Is this a known bug?

Ramsey


 _______________________________________________
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

  • Follow-Ups:
    • Re: NSTimestamp bug in timestampByAddingGregorianUnits
      • From: Timo Hoepfner <email@hidden>
    • Re: NSTimestamp bug in timestampByAddingGregorianUnits
      • From: David LeBer <email@hidden>
    • Re: NSTimestamp bug in timestampByAddingGregorianUnits
      • From: Chuck Hill <email@hidden>
    • Re: NSTimestamp bug in timestampByAddingGregorianUnits
      • From: David Avendasora <email@hidden>
  • Prev by Date: Let's play "Spot the Deadlock" ;-)
  • Next by Date: Re: NSTimestamp bug in timestampByAddingGregorianUnits
  • Previous by thread: Re: Let's play "Spot the Deadlock" ;-)
  • Next by thread: Re: NSTimestamp bug in timestampByAddingGregorianUnits
  • Index(es):
    • Date
    • Thread