Date: Tue, 24 Jun 2008 09:38:36 +0200 From: Pietro Cerutti <gahr@FreeBSD.org> To: camiloreyes82@yahoo.com Cc: freebsd-questions@freebsd.org Subject: Re: Opera's javascript time is off Message-ID: <4860A47C.8030008@FreeBSD.org> In-Reply-To: <813980.41071.qm@web63908.mail.re1.yahoo.com> References: <813980.41071.qm@web63908.mail.re1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Camilo Reyes wrote: | All, for some reason when javascript posts the current system time inside | of Opera, it reports it as being off by one hour. For example, when I use | gmail chat; the time is off by one hour. Any reason that could be causing | this odd behaviour? I've looked around the Opera site and there is nothing | mentioned there; it's as if the javascript was using the wrong time zone. Is your timezone UTC+1 or UTC-1? I see the same behavior here. It seems that getTimezoneOffset() has a problem with Opera. Try this out: <script language="JavaScript"> ~ var d = new Date(); ~ document.write(d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds()); ~ document.write("<br/>Offset: " + d.getTimezoneOffset() / 120); </script> In Firefox: 9:36:32 Offset: -1 In Opera: 7:36:18 Offset: 0 | | "Bono Vince Malum" | -- | -Camilo | | | | _______________________________________________ | freebsd-questions@freebsd.org mailing list | http://lists.freebsd.org/mailman/listinfo/freebsd-questions | To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkhgpHsACgkQwMJqmJVx946cBgCg2ZT1dam3MLJUGt7w4OZDrKwR wEkAoKyNEPV2c4nRNViueIZ6TaQzq/Li =ZQ2E -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4860A47C.8030008>