Internet Time
Gordon Webster
gwalias-rev at yahoo.com
Wed May 4 09:41:43 EDT 2005
As I said in my previous post, if you do:
convert the internet date to seconds
it doesn't account for the timezone. However, the
following rev construction:
the last word of the internet date
gives you the correct offset to GMT. Here in
Cambridge, MA, I get '-0400' which is correct since
both Cambridge and London are on DST (local standard
time + 1 hour).
I must therefore add 4 hours (and zero minutes) worth
of seconds onto my local time (taking account of the
sign of the offset).
The complications arise in knowing which countries are
currently using DST and which are not, especially
since even the countries that do use it, do not all
"spring forward" or "fall back" on the same day.
There are databases online that list which countries
use DST and when they change. Perhaps using a cunning
HTTP script, somebody could create a "World Time
Stack" ;-)
Best
Gordon
--- Mikey <mikeythek at gmail.com> wrote:
> Expanding on this thought, I don't know off the top
> of my head how you
> would do this, but using the web features of RR, you
> could perhaps use
> the PHP function date to get your offset. In this
> case it would be
> date("Z"), which should return the seconds offset
> from GMT.
>
> Oh, and once again I forgot to add the tao blog to
> the sig. I'm such an idiot.
> --
> http://taoofrunrev.blogspot.com
> http://taoof4d.blogspot.com
> http://4dwishlist.blogspot.com
> On the first day, God created the heavens and the
> Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a
> few hours,
> and did a little diving.
> And God said, "This is good."
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
>
http://lists.runrev.com/mailman/listinfo/use-revolution
>
:::::::::: Gordon Webster ::::::::::
More information about the use-livecode
mailing list