Re: [PATCH 1/1] gitweb: javascript ability to adjust time based on timezone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/24 Jakub Narebski <jnareb@xxxxxxxxx>:
>> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]