1. ares4322
  2. jsTimezoneDetect

Commits

ares4322  committed 88ae7a4

#BUGFIX 1. Set current year for offset determine functions

  • Participants
  • Parent commits 6c845a1
  • Branches default

Comments (0)

Files changed (1)

File detect_timezone.js

View file
  • Ignore whitespace
         },
         
         get_january_offset = function () {
-            return get_date_offset(new Date(2010, 0, 1, 0, 0, 0, 0));
+            return get_date_offset(new Date((new Date).getFullYear(), 0, 1, 0, 0, 0, 0));
         },
     
         get_june_offset = function () {
-            return get_date_offset(new Date(2010, 5, 1, 0, 0, 0, 0));
+            return get_date_offset(new Date((new Date).getFullYear(), 6, 1, 0, 0, 0, 0));
         },
         
         /**