Re: NSTimestamp.timestampByAddingGregorianUnits considered harmful
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