• 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: 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

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

  • Prev by Date: Re: Getting the time zone
  • Next by Date: Dumb Finder scripting question
  • Previous by thread: Re: Getting the time zone
  • Next by thread: Re: Getting the time zone
  • Index(es):
    • Date
    • Thread