By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,940 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

Need help with Time Validation in JavaScript

P: n/a
Hi,

We have an application where my clients may be at different timezones.
I need to validate time across the timezones with javascript. The date
object in JavaScript does not allow me to get the timezone.

Any implementation suggestions?

Thanks

-Megha.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Megha Vishwanath wrote:
We have an application where my clients may be at different timezones.
I need to validate time across the timezones with javascript. The date
object in JavaScript does not allow me to get the timezone.


You're wrong, see
http://devedge.netscape.com/library/...e.html#1193844
PointedEars

Jul 20 '05 #2

P: n/a
JRS: In article <bm************@ID-107532.news.uni-berlin.de>, seen in
news:comp.lang.javascript, Thomas 'PointedEars' Lahn
<Po*********@web.de> posted at Thu, 16 Oct 2003 16:08:50 :-
Megha Vishwanath wrote:
We have an application where my clients may be at different timezones.
I need to validate time across the timezones with javascript. The date
object in JavaScript does not allow me to get the timezone.


You're wrong, see
http://devedge.netscape.com/library/...ference/date.h
tml#1193844


The Date Object allows access to the TimezoneOffset of the executing
computer, for the date/time in the Object, assuming the OS is correctly
set. But it knows nothing of remote Timezones and summer time rules.

With an annual exception in Spring, and with allowance for the way (for
example) Germans spell October, time validation is independent of time
location.

But MV may need to validate a remote civil time against a GMT range.

See below, in particular js-date5.htm#DDTA which tests code for reading
Remote Time. Note : at present, the code re-parses TZ for every
conversion; I'm thinking about improving that.

However, if the remote time is local to the remote browser, then
javascript can readily give GMT; if time is in multiple zones, one
should generally use GMT.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.