Sorry Jeff, I think you've missed it again...
Although Greenwich "starts the day", different areas are + or - GMT.
Double-click your clock on your task bar and select the time zone tab; if
you open the dropdown box you will see the list of areas and their relation
to GMT.
This is all off-subject at this point; the code I have DOES work, except for
this one-second "needed offset" in order for the offset hour to appear
properly.
m
-----Original Message-----
From: Jeff Peters [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 10:23 AM
To: Fusebox
Subject: RE: [OT] Timezone madness
Ah! In that case I fall back on another thing I noticed:
Reverse your arguments in DateDiff(). It expects the first argument to be
less
than the second, and gets off its feed if you do otherwise. Since UTC is by
definition always less than any other date/time on the planet (Greenwich
starts
the day), your UTC value should be first argument.
I tested your code with the arguments switched, and it works as your
comments
says it should.
- Jeff
On 30 Mar 2001, at 10:09, Marc Funaro wrote:
> Jeff,
>
> Thanks for the response, but I think you've missed it, unless i am totally
> misreading the recommendation you've made. I explain:
>
> The definition of the function GetTimeZoneInfo() is "Returns a structure
> containing time zone information FOR THE MACHINE ON WHICH THIS FUNCTION IS
> EXECUTED." The function is always executed on the server, not on the
user's
> machine, yes?
>
> This will not help at all in determining what time zone a WEB VISITOR is
in,
> as far as I can tell. It only returns the time zone info of the server,
> which we already know.
>
> We currently use DateConvert("Local2UTC", Now()) to get the current UTC
> time, which we compare against the time on the user's computer as they
> submitted in a hidden form field. The difference between UTC and the
user's
> time as submitted determines the user's time zone.
>
> Please re-read my original post if this is not clear; and I can always
> provide additional code if necessary.
>
> Marc
==============================================================
| Jeffrey S. Peters | "Specialization is for insects." |
| [EMAIL PROTECTED] | - Lazarus Long |
| PGP key for Jeffrey S. Peters at ldap://keyserver.pgp.com |
==============================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists