• 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
Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful


  • Subject: Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 17 Oct 2008 15:47:42 +1100

On 17/10/2008, at 6:15 AM, Ralf Schuchardt wrote:

Hi,

I have modelled calendar entries, which have a timestamp attribute. I wanted to build a qualifier that matches all entries within a month so I created start and end timestamps programatically. The start timestamp is no problem. To get the end timestamp, I used NSTimestamp.timestampByAddingGregorianUnits and added "a month minus one second". This works fine for GMT, but gives me funky results for e.g. Europe/Berlin. Please see code and output below. Any ideas? This is with WO 5.3.3.

Timo

you might also try the joda-time library. It has functions for using the "natural" meaning of intervals like "1 month".

It's also worth verifying that your tzdata is up to date. We were bitten by this earlier in the year.
http://support.apple.com/kb/TA24629?viewlocale=en_US
http://support.apple.com/kb/TA24594?viewlocale=en_US
etc


with regards,
--

Lachlan Deck



_______________________________________________
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.timestampByAddingGregorianUnits considered harmful
      • From: Timo Hoepfner <email@hidden>
References: 
 >NSTimestamp.timestampByAddingGregorianUnits considered harmful (From: Timo Hoepfner <email@hidden>)
 >Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful (From: Ralf Schuchardt <email@hidden>)

  • Prev by Date: Having trouble with XcodeMigration
  • Next by Date: Re: EOObjectNotAvailableException: prepareForSaveWithCoordinator
  • Previous by thread: Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful
  • Next by thread: Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful
  • Index(es):
    • Date
    • Thread