Re: Getting the time zone
Re: Getting the time zone
- Subject: Re: Getting the time zone
- From: Stan Cleveland <email@hidden>
- Date: Thu, 13 Dec 2007 18:02:35 -0800
- Thread-topic: Getting the time zone
On 12/13/07 5:46 PM, Paul Berkowitz wrote:
> Not exactly. But to get similar info, you can use
>
> time to GMT
>
> standard addition command (which is not the same as 'time to British Summer
> Time' and this changes during the summer months, but is equivalent to the
> -0700 -type timestamp you'll see in email headers).
The "time to GMT" command returns the difference between the current time
zone and Universal Time, in seconds. The following will give the difference
in hours:
set diff to (time to GMT) / 60 / 60
--> -8.0
If you actually need the *name* of the time zone, you could create a lookup
table of time zone names and normalize the result from the above script (to
eliminate negative numbers and convert to an integer) to use as the index.
HTH,
Stan C.
_______________________________________________
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