ASP time in GMT

ASP time in GMT

am 13.03.2007 23:11:23 von Abs

Hello,

I've used this ASP funtion to display the time on my web page:

Date: <%= FormatDateTime(Date, 1)%>
Time: <%= FormatDateTime(now, 4)%>

THis was working fine until i moved my site to a server based in the states,
not the time is 5hrs behind. Can anyone help me resolve this??

Many thanks.

Abs

Re: ASP time in GMT

am 13.03.2007 23:22:08 von exjxw.hannivoort

Abs wrote on 13 mrt 2007 in microsoft.public.inetserver.asp.general:

> Hello,
>
> I've used this ASP funtion to display the time on my web page:
>
> Date: <%= FormatDateTime(Date, 1)%>
> Time: <%= FormatDateTime(now, 4)%>
>
> THis was working fine until i moved my site to a server based in the
> states, not the time is 5hrs behind. Can anyone help me resolve
> this??

It would be usefull if you told us your timezone!

This topic was posted by me yesterday in his NG,

The server being in Toronto [Now],
the result in Central European Time [nowCET].
> ==================================
> <%
> nowGMT = DateAdd("h", TimezoneOffset, Now)
> nowCET = DateAdd("h", 1, nowGMT)
> If nowGMT>#2007-03-25 01:00# Then nowCET = DateAdd("h",2,nowGMT)
> If nowGMT>#2007-10-28 01:00# Then nowCET = DateAdd("h",1,nowGMT)
> If nowGMT>#2008-03-30 01:00# Then nowCET = DateAdd("h",2,nowGMT)
> If nowGMT>#2008-10-26 01:00# Then nowCET = DateAdd("h",1,nowGMT)
> %>
>
>
> ===========================================

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: ASP time in GMT

am 13.03.2007 23:41:42 von MikeR

Abs wrote:
> Hello,
>
> I've used this ASP funtion to display the time on my web page:
>
> Date: <%= FormatDateTime(Date, 1)%>
> Time: <%= FormatDateTime(now, 4)%>
>
> THis was working fine until i moved my site to a server based in the states,
> not the time is 5hrs behind. Can anyone help me resolve this??
>
> Many thanks.
>
> Abs
>
>
http://classicasp.aspfaq.com/date-time-routines-manipulation /how-do-i-convert-local-time-to-utc-gmt-time.html
Mike

Re: ASP time in GMT

am 14.03.2007 04:44:41 von Jon Paal

ASP runs on the server and will return server time. If you want local time of the user to be displayed on the page you can use
client side javascript .





"Abs" wrote in message news:%23weF4rbZHHA.4616@TK2MSFTNGP03.phx.gbl...
> Hello,
>
> I've used this ASP funtion to display the time on my web page:
>
> Date: <%= FormatDateTime(Date, 1)%>
> Time: <%= FormatDateTime(now, 4)%>
>
> THis was working fine until i moved my site to a server based in the states, not the time is 5hrs behind. Can anyone help me
> resolve this??
>
> Many thanks.
>
> Abs
>

Re: ASP time in GMT

am 14.03.2007 10:18:49 von exjxw.hannivoort

Jon Paal [MSMD] wrote on 14 mrt 2007 in
microsoft.public.inetserver.asp.general:

> "Abs" wrote in message
>> THis was working fine until i moved my site to a server based in the
>> states, not the time is 5hrs behind. Can anyone help me resolve
>> this??

[Please do not toppost on usenet]

> ASP runs on the server and will return server time. If you want local
> time of the user to be displayed on the page you can use client side
> javascript .

However, it is quite possible to add
trusted [ ;-) ] serverside time precision to that:

==========================



============================

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: ASP time in GMT

am 14.03.2007 15:27:05 von Abs

Thanks guys, probably use javascript.

"Evertjan." wrote in message
news:Xns98F368EB62992eejj99@194.109.133.242...
> Jon Paal [MSMD] wrote on 14 mrt 2007 in
> microsoft.public.inetserver.asp.general:
>
>> "Abs" wrote in message
>>> THis was working fine until i moved my site to a server based in the
>>> states, not the time is 5hrs behind. Can anyone help me resolve
>>> this??
>
> [Please do not toppost on usenet]
>
>> ASP runs on the server and will return server time. If you want local
>> time of the user to be displayed on the page you can use client side
>> javascript .
>
> However, it is quite possible to add
> trusted [ ;-) ] serverside time precision to that:
>
> ==========================
>
>
>
> ============================
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)