Re: parsing Unix date
Re: parsing Unix date
- Subject: Re: parsing Unix date
- From: Joshua See <email@hidden>
- Date: Sun, 11 Jan 2004 23:44:18 -0600
On 1/9/2004 11:48, I wrote:
Lastly, this doesn't handle time zones set in fractions of an hour off
GMT, since I don't know of any.
On Jan 11, 2004, at 8:28 PM, Andrew Johnson wrote:
You mean, like several former USSR states, Afghanistan, Australia, and
India ?
On Jan 11, 2004, at 5:22 PM, John W. Baxter wrote:
There are some, including a few island nations of notable size, and
several
smaller islands. You'll find at least 15, 30, and 45 minutes from the
hour.
<sigh>I should have known better. At least nobody called my whose
clause on the carpet. The will also fix any potential problems with
padding characters on the date header line.
tell application "foo mail client"
set d to every paragraph of (source of current message)
set d to first item of d whose contents starts with "Date:"
set tz to ((text 1 thru 2 of last word of d) as integer) * hours
set tz to tz + ((text 3 thru 4 of last word of d) as integer) * minutes
-- Watch the wrapping.
set tz to tz * (character (((length of last word of d) + 1) * -1) of d
& "1")
set d to (date d) - tz + (time to GMT)
end tell
Sincerely,
Joshua See
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.