• 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: Getting the time zone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the time zone


  • Subject: Re: Getting the time zone
  • From: Philip Aker <email@hidden>
  • Date: Fri, 14 Dec 2007 05:02:31 -0800

On 2007-12-13, at 17:09:45, Rob Lewis wrote:

How can you get the computer's time zone setting in a script?

Also, I've seen a date/time format in XMP metadata like this:

2007-12-14T17:55:38-08:00

Where the letter "T" seems to separate the date from the time, and the time zone offset is tacked onto the end.


Is this a standard format? Is it directly supported in AppleScript? Shell script?


I see you've been supplied with the shell and GMT offset solution. Here's the AppleScript:
set cd to (((current date) as «class isot») as text) & ((time to GMT) / 3600)
(cd as «class isot») as date


more or less anyway. I'm not sure if time to GMT puts out a "+" if one lives on the other side of Grenwich.

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

 _______________________________________________
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

  • Follow-Ups:
    • Re: Getting the time zone
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Getting the time zone (From: Rob Lewis <email@hidden>)

  • Prev by Date: AppleScript's shortcomings [was Re: Getting the time zone]
  • Next by Date: Re: Getting the time zone
  • Previous by thread: AppleScript's shortcomings [was Re: Getting the time zone]
  • Next by thread: Re: Getting the time zone
  • Index(es):
    • Date
    • Thread