the convert command

wouter wouter.abraham at pi.be
Thu Apr 10 10:00:00 EDT 2003


Hi all,

Working on some time-related routines, I was confronted with a "quirk" 
of the convert command. As this is not mentioned in the MetaTalk 
Reference nor in the Revolution Transcript Language Dictionary I throw 
this one on the list.
Try this script with timezone settings for one place with and one 
without observing DST (daylight saving time or local summer time)

on mouseUp
   put the long time & cr into fld "result"  -- reference
   get the long time
   put it into it2
   convert it to long time
   put it & cr after fld "result"
   convert it2 to dateitems
   convert it2 to long time
   put it2 after fld "result"
end mouseUp

If the timezone is set to Chicago - USA then the output  is for example 
:
7:32:48 AM
7:32:48 AM
7:32:48 AM

if the timezone is set to  Brussels - Belgium (which is observing DST 
for the moment) then the output is :
2:35:09 PM
3:35:09 PM
4:35:09 PM

So this quirk can come in handy to determine if the computer is 
observing DST or not. But for converting back and forth one should be 
careful.

Have a nice whatever,
WA




More information about the metacard mailing list