• 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: easy one: current date in Paris
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: easy one: current date in Paris (From: kai <email@hidden>)

  • Prev by Date: Re: Unixcommand for locking/unlocking....
  • Next by Date: Re: Insert silence in say's text
  • Previous by thread: Re: easy one: current date in Paris
  • Next by thread: Re: easy one: current date in Paris
  • Index(es):
    • Date
    • Thread