| Index: src/date-delay.js
|
| ===================================================================
|
| --- src/date-delay.js (revision 2614)
|
| +++ src/date-delay.js (working copy)
|
| @@ -156,8 +156,7 @@
|
|
|
| // NOTE: The implementation relies on the fact that no time zones have
|
| // more than one daylight savings offset change per month.
|
| -// This function must never be called with the argument NaN.
|
| -// All uses of it are guarded so this does not happen.
|
| +// If this function is called with NaN it returns NaN.
|
| function DaylightSavingsOffset(t) {
|
| // Load the cache object from the builtins object.
|
| var cache = DST_offset_cache;
|
| @@ -652,12 +651,13 @@
|
|
|
|
|
| function LocalTimezoneString(time) {
|
| - // time is not NaN because of checks in calling functions.
|
| - var timezoneOffset = (local_time_offset + DaylightSavingsOffset(time)) / msPerMinute;
|
| + var timezoneOffset =
|
| + (local_time_offset + DaylightSavingsOffset(time)) / msPerMinute;
|
| var sign = (timezoneOffset >= 0) ? 1 : -1;
|
| var hours = FLOOR((sign * timezoneOffset)/60);
|
| var min = FLOOR((sign * timezoneOffset)%60);
|
| - var gmt = ' GMT' + ((sign == 1) ? '+' : '-') + TwoDigitString(hours) + TwoDigitString(min);
|
| + var gmt = ' GMT' + ((sign == 1) ? '+' : '-') +
|
| + TwoDigitString(hours) + TwoDigitString(min);
|
| return gmt + ' (' + LocalTimezone(time) + ')';
|
| }
|
|
|
|
|