Re: Getting the time zone
Re: Getting the time zone
- Subject: Re: Getting the time zone
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 14 Dec 2007 08:16:40 -0500
Duh, I forgot about class isot. But it apparently doesn't incluide
the time zone.
Rob also pointed out offlist that the standard requires a colon
between the offset hours and minutes.
Martin's correct that variants of the standard format are popular,
usually with a space replacing the "T" between the date and time
fields. It's worth noting that the standard does not allow this - no
whitespace.
sage -
I see you've been supplied with the shell and ...
On 12/14/07, Philip Aker <email@hidden> wrote:
> 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.@
>
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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