[thelist] web and db server local time
Jon Molesa
rjmolesa at consoltec.net
Fri Nov 16 21:16:36 CST 2007
Nice! Thanks.
*On Fri, Nov 16, 2007 at 04:26:50PM -0700 Ken Snyder <kendsnyder at gmail.com> wrote:
> Date: Fri, 16 Nov 2007 16:26:50 -0700
> From: Ken Snyder <kendsnyder at gmail.com>
> Subject: Re: [thelist] web and db server local time
> To: "thelist at lists.evolt.org" <thelist at lists.evolt.org>
>
> Jon Molesa wrote:
> > AFAIK, the time is local to the server. Browsers don't report their
> > time without some kind of javascript.
> > ...
> Here's a way you can get browsers to report their timezone:
>
> <form name="login" action="" method="post">
> <input type="text" name="username" value="" />
> <input type="password" name="password" value="" />
> <input type="hidden" name="minutes_offset" value="" />
> <script type="javascript" type="text/javascript">
> //<![CDATA[
> document.forms.login.minutes_offset.value = new
> Date().getTimezoneOffset();
> //]]>
> </script>
> <input type="submit" name="submit" value="Login" />
> </form>
>
>
> "minutes_offset" will then be posted to the server so that dates from
> and to the user can be converted. "minutes_offset" is the offset from
> GMT/UTC time. If the user has JavaScript disabled, then you can default
> to the server clock timezone or whatever.
>
> - Ken Snyder
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
--
Jon Molesa
rjmolesa at consoltec.net
if you're bored or curious
http://rjmolesa.com
More information about the thelist
mailing list