Christopher Brandsdal wrote on 20 aug 2003 in
microsoft.public.inetserver.asp.general:
I have a javascript serverside script that stores the "Date" command
in a database.
The problem is that I am in Norway, ans the server is in Florida!
It's a BIG timedifference.
When I use ASP I just use the <% Session.LCID = 1044 %> command at the
top of the page.
A "javascript serverside script" is ASP !
ASP is not another word for vbscript !
ASP is a platform both for jscript and vbscript.
Session.LCID = 1044 (Nynorsk) should also work for jscript,
but it changes only the DATEFORMAT, not the TIMEZONE.
=====================
Perhaps the best serverside javascript for your question is IMHO:
d = new Date();
tz = d.getTimezoneOffset();
With the variable tz, the difference between the servertime and UTC, you
can construct your own local time in serverside jscript and in serverside
vbscript.
The translation from UTC to your local (summer)time cannot be done
without you suplying the specific info for that.
=================================
another way to get UTC:
<script language="JScript" runat=server>
var d = new Date();
var utcd = d.toGMTString();
Response.Write('Current = ' + d + '<br>UTC = ' + utcd );
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)