Converting times

J. Landman Gay jacque at hyperactivesw.com
Wed Nov 5 19:04:56 EST 2003


On 11/5/03 5:57 PM, JonathanC at ag.nsw.gov.au wrote:

> [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?

Do your scripts have anything in them besides what you posted? I just 
tried all three examples and correctly got "8:17 AM" each time.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list