Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GMT conversion

0 views
Skip to first unread message

nic...@my-deja.com

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
I am displaying a time that comes through in GMT and I need to convert
it to the correct timezone.

Does anyone know a way to take the date string that is displayed, tell
the server that this time is in GMT and get it to convert it to the
local server timezone??

All help appreciated.

Cheers

Nick


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Nic Roche

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
Nick,

JavaScript may be the answer.

<snip src="Netscape JavaScript Reference">


toLocaleString
Converts a date to a string, using the current locale's conventions.
Method of
Date

Implemented in
Navigator 2.0, LiveWire 1.0


Syntax
toLocaleString()
Parameters
None

Description
If you pass a date using toLocaleString, be aware that different platforms
assemble the string in different ways. Using methods such as getHours,
getMinutes, and getSeconds gives more portable results.

Examples
In the following example, today is a Date object:

today = new Date(95,11,18,17,28,35) file://months are represented by 0 to
11today.toLocaleString()
In this example, toLocaleString returns a string value that is similar to
the following form. The exact format depends on the platform.

12/18/95 17:28:35
See also
Date.toGMTString

</snip>

Nic Roche
Net Extra
www.extra.net.au

<nic...@my-deja.com> wrote in message news:7muppe$nee$1...@nnrp1.deja.com...

0 new messages