Changeset 10932 in webkit for trunk/JavaScriptCore/kjs/date_object.cpp
- Timestamp:
- Oct 24, 2005, 1:45:59 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/date_object.cpp
r10801 r10932 885 885 } 886 886 887 // Determine whether DST is in effect. mktime() can't do this for us because 888 // it doesn't know about ms and yearOffset. 889 // NOTE: Casting values of large magnitude to time_t (long) will 890 // produce incorrect results, but there's no other option when calling localtime_r(). 891 if (!utc) { 892 time_t tval = mktime(t) + (time_t)((ms + yearOffset) / 1000); 893 struct tm t3; 894 localtime_r(&tval, &t3); 895 t->tm_isdst = t3.tm_isdst; 896 } 897 887 898 return (mktime(t) + utcOffset) * msPerSecond + ms + yearOffset; 888 899 }
Note:
See TracChangeset
for help on using the changeset viewer.