Re: Date-Only NSTimestamps
Re: Date-Only NSTimestamps
- Subject: Re: Date-Only NSTimestamps
- From: Simon McLean <email@hidden>
- Date: Wed, 2 Jan 2008 21:08:51 +0000
So, what are the best practices for working with an NSTimestamp field, when all you really want is the date, not the time?
There isn't any that I am aware of. I usually "normalize" these to noon in the setXXXDate() methods.
You can get some funny results normalising stuff if your server is in a timezone that uses daylight saving and your report time frame crosses the point at which the timezone switches. eg. normalising to 12 noon mid winter in the UK gives you 12:00 GMT, but in the summer it gives you 11:00 GMT. I can't remember exactly where it goes wrong, i just remember being bitten by it on more than one occasion...
Simon
|
_______________________________________________
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