From: Kevin Cernekee Date: Thu, 24 Mar 2011 22:00:08 GMT Subject: Re: [PATCH 1/1] gitweb: javascript ability to adjust time based on timezone Message-ID: In-Reply-To: <201103242119.40214.jnareb@gmail.com> 2011/3/24 Jakub Narebski : >> 4) IE6 does not seem to like ISO 8601 format: >> >> x = new Date("2011-03-09T03:29:09Z"); >> >> This sets all fields to NaN.  I suspect that getTime() values >> (milliseconds since 1970-01-01) are more portable. > > Do you mean using epoch in title attribute, or fallback to parsing > ISO 8601 UTC format with regexps? getTime() format is $epoch * 1000. When I switched to that format, all 3 of my browsers were able to handle it. I really don't think relying on "new Date(iso8601_timestamp)" is a good idea, but I guess the string parsing approach would work: http://webcloud.se/log/JavaScript-and-ISO-8601/ > Dealing with DST (zoneinfo library) is simply too hard for JavaScript > IMHO.  What we could do is to store "local" in cookie, not a fixed TZ > offset (or perhaps store both as to not recalculate it). I agree, and I do not have a comprehensive solution for handling non-local timezones. > Hmmm... perhaps a 'config' page? Any thoughts on what other user-configurable items might get added in the future, and whether they will be on the client side or server side?