Converting times
JonathanC at ag.nsw.gov.au
JonathanC at ag.nsw.gov.au
Wed Nov 5 18:57:36 EST 2003
[Firstly, thanks Sarah<sarahr at genesearch.com.au> for your answers about
plugins and modes etc. ("Re: Pointer tool not working"). My Launcher stack
was set to open at startup as a palette, not a modeless window. It's
starting to make sense.]
Anyway, I've got another question now:
I have written a stack that converts a user-entered time to seconds (to
test that it's a valid time) then back to short time (to standardise it).
It works fine in HyperCard, but in Revolution, it adds an hour!
I tried this is the multi-line message box:
ask "Enter a time:" with "8:17 am"
convert it to secs
convert it to short time
answer it
... and the result was "9:17 am"
Then I tried this:
ask "Enter a time:" with "8:17 am"
convert it to dateItems
convert it to short time
answer it
... and the result was "10:17 am"!
Finally I tried this:
ask "Enter a time:" with "8:17 am"
convert it to dateItems
answer it
... and the result was "2003,11,6,9,17,0,5" (i.e. 9:17 am )!!
What's going on here?
Jonathan Cooper
Manager of Information / Website
Art Gallery of New South Wales
Sydney, Australia
http://www.artgallery.nsw.gov.au
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential. If you are not the intended
recipient please advise the sender by return email, do not use or disclose
the contents, and delete the message and any attachments from your system.
Unless specifically indicated, this email does not constitute formal
advice or commitment by the sender or the Art Gallery of NSW (ABN 24 934
492 575) or its related entities.
More information about the use-livecode
mailing list