Re: easy one: current date in Paris
Re: easy one: current date in Paris
- Subject: Re: easy one: current date in Paris
- From: kai <email@hidden>
- Date: Wed, 6 Jul 2005 20:56:02 +0100
On Wednesday, July 6, 2005, at 12:48 am, I wrote:
Now - about that small matter of daylight saving...
Here's an approach that works OK here (can't say how it'll fare
elsewhere - although I'd be interested to know). Perhaps not as nifty
as Martin's Automator stuff - but might do for earlier systems. It
develops the 'choose from list' approach that Michelle kicked off with,
incorporates 'zdump' (which I see Barry Wainwright suggested) - and
finally attempts to return the result as an AppleScript date (in case
further scripting might be useful):
--------
set p to (path to "dlib")'s POSIX path & ¬
"Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/zi/"
set z to choose from list (list folder POSIX file p ¬
without invisibles) with prompt "Choose a time zone:"
if z is false then error number -128
set z to z's beginning
set p to POSIX file (p & z)
if (info for p)'s folder then
set a to choose from list (list folder p without invisibles) ¬
with prompt "Choose an area from " & z & ":"
if a is false then error number -128
set z to z & "/" & a
end if
tell (do shell script "zdump " & z)'s text ((count z) + 3) ¬
thru -1 to my date (text 1 thru word 3 & space & ¬
word 7 & ", " & text from word 4 to word 6)
--------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden