Re: Issues subtracting Unix epoch from date
Re: Issues subtracting Unix epoch from date
- Subject: Re: Issues subtracting Unix epoch from date
- From: Shane Stanley <email@hidden>
- Date: Sat, 20 Feb 2010 21:18:57 +1100
- Thread-topic: Issues subtracting Unix epoch from date
AppleScript dates don't take time zones into account; they're simple dates,
calculated as if there was just one time zone. That makes translating them
into formats that do use time zones a difficult business.
I hit the same problem recently converting between AS dates and NSDates in
ASObjC. The suggestion there was to use the reference date, but it failed in
a similar fashion.
I suspect you'll do best by getting the relevant properties of AS dates
(day, year, month, hours, minutes, seconds), and using them as if they
represent the date in your current time zone (and vice-versa).
But really, you converting between two different things, so any solution is
going to be a compromise.
--
Shane Stanley <email@hidden>
AppleScript Pro, April 2010, Florida <http://www.applescriptpro.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden