Changeset 18514 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Jan 1, 2007, 8:19:35 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/DateMath.cpp
r17520 r18514 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten ([email protected]) 3 * Copyright (C) 2006 Apple Computer3 * Copyright (C) 2006-2007 Apple Computer 4 4 * 5 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 … … 300 300 301 301 memset(&localt, 0, sizeof(localt)); 302 303 // get the difference between this time zone and GMT304 localt.tm_mday = 2;305 localt.tm_year = 70;306 307 utcOffset = mktime(&localt) - (hoursPerDay * secondsPerHour); 308 utcOffset *= -msPerSecond;302 303 // get the difference between this time zone and UTC on Jan 01, 2000 12:00:00 AM 304 localt.tm_mday = 1; 305 localt.tm_year = 100; 306 utcOffset = 946684800.0 - mktime(&localt); 307 308 utcOffset *= msPerSecond; 309 309 310 310 utcOffsetInitialized = true; … … 359 359 // determining DST. For this reason we shift years that localtime can handle but would 360 360 // return historically accurate information. 361 362 // if before 2000 or after 2038361 362 // if before Jan 01, 2000 12:00:00 AM UTC or after Jan 01, 2038 12:00:00 AM UTC 363 363 if (ms < 946684800000.0 || ms > 2145916800000.0) { 364 364 int year;
Note:
See TracChangeset
for help on using the changeset viewer.