Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timezone

Status
Not open for further replies.

vascobrito

Technical User
Feb 27, 2003
28
PT
hi there,
i have a script(ClockRun) that runs a clock giving the hours,minutes and seconds.
what i need to do is show the local time in users computer, and show the time in two more diferent timezones.
I can show local user time, but i'm don't know how to to now the time in "Lisbon" and "Sao Paulo" for instance.
what i'm using is this:

var date = new Date();
var hour = date.getHours();
var minutes = date.getMinutes();
var seconds = date.getSeconds();
new ClockRun(hour,minutes,second)

so, i want to run the "ClockRun" with those two diferent timezones, for wich i have to know the actual time of the timezone in date.

can anyone help me?

thanks in advance
 
Hello vascobrito,

You can use date.getTimezoneOffset() (signed integer in unit of minutes) being the local time zone info. Time zones of the alternative places (Lisbon and Sao Paulo) should be known by the scripter. With these two pieces of info, you should arrive at what you need.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top