ohei
05-04-2004, 10:19 AM
Hi,
there seems the be a bug in the World Clock script available at http://javascript.internet.com/calendars/.
The time displayed can get negative. To overcome this problem of the great script, replace
var def = dt.getTimezoneOffset()/60;
var gmt = (dt.getHours() + def);
with
var def = dt.getTimezoneOffset()/60;
var gmtval = (dt.getHours() + def);
// check for negative value
var gmt = (gmtval < 0) ? (24 + gmtval) : gmtval;
Regards,
ohei
there seems the be a bug in the World Clock script available at http://javascript.internet.com/calendars/.
The time displayed can get negative. To overcome this problem of the great script, replace
var def = dt.getTimezoneOffset()/60;
var gmt = (dt.getHours() + def);
with
var def = dt.getTimezoneOffset()/60;
var gmtval = (dt.getHours() + def);
// check for negative value
var gmt = (gmtval < 0) ? (24 + gmtval) : gmtval;
Regards,
ohei