• 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: Issues subtracting Unix epoch from date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Issues subtracting Unix epoch from date (From: Nathan Vander Wilt <email@hidden>)

  • Prev by Date: Issues subtracting Unix epoch from date
  • Next by Date: Re: Issues subtracting Unix epoch from date
  • Previous by thread: Issues subtracting Unix epoch from date
  • Next by thread: Re: Issues subtracting Unix epoch from date
  • Index(es):
    • Date
    • Thread