Re: Recording and looking up dates, when day-wide precision is required
Re: Recording and looking up dates, when day-wide precision is required
- Subject: Re: Recording and looking up dates, when day-wide precision is required
- From: Lachlan Deck <email@hidden>
- Date: Tue, 30 Dec 2008 18:12:40 +1100
On 25/12/2008, at 6:54 AM, Ken Anderson wrote:
What I do is build a GregorianCalendar using the user's local
timezone, extract the day/month/year using the get method of
GregorianCalendar, then construct a new date using GMT.
new NSTimestamp(date) does the same thing (assuming you've used a
formatter in the user's timezone) :-)
When I take that date out of the database, I use a date formatter
set to GMT, and I always get the date the user input, regardless of
what timezone they were in.
Again, NSTimestamp is already GMT unless you're saying you're using a
different column type.
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