On-Rev and Daylight Savings Time (Addendum)

Sarah Reichelt sarah.reichelt at gmail.com
Mon Aug 31 23:25:44 EDT 2009


On Tue, Sep 1, 2009 at 1:07 PM, Gregory Lypny<gregory.lypny at videotron.ca> wrote:
> Just a little more detail on my previous post.  Would appreciate anyone
> confirming that iRev does not adjust for local Daylight Savings Time or I've
> misunderstood something because this has the potential to really mess up my
> work if I get it wrong.
>
> There's a difference of one hour as this code in iRev
>
> <?rev
> put the seconds & "</br>"
> convert the seconds to dateItems
> put it & "</br>"
> put the long time
> ?>
>
> returns
>
> 1251773601
> 2009,8,31,21,53,21,2
> 9:53:21 PM
>
> and the equivalent handler in Revolution
>
> put the seconds
> convert the seconds to dateItems
> put return & it after msg
> put return & the long time after msg
>
> run three seconds later, returns
>
> 1251773604
> 2009,8,31,22,53,24,2
> 10:53:24 PM
>

It really isn't a daylight savings issue. The difference is that when
you use iRev, the computer that is getting the time is physically in
Texas, so you are getting Texan time, not Montreal time. The fact that
this is exactly 1 hour different to yours is throwing you off the
track. In fact both Montreal & Texas are on daylight savings time at
the moment, as far as I can see.

"the seconds" records any instant in time as the same number,
regardless of where the computer is, but when that number is
converted, the time zone of the computer doing the conversion is taken
into account. This is why your computer gives a different result to
the server computer in Texas.

As a test, get "the internet date" on both your computer and from an
iRev script. The last word of this gives the time zone of the computer
reporting the time and in your case it should be -0400, while the iRev
script should give -0500 (or -0500 & -0600 after daylight savings time
stops). These can be used to do a conversion to your local time.

Cheers,
Sarah



More information about the use-livecode mailing list