diff options
author | sdagley%netscape.com <devnull@localhost> | 2001-09-17 23:42:12 +0000 |
---|---|---|
committer | sdagley%netscape.com <devnull@localhost> | 2001-09-17 23:42:12 +0000 |
commit | ed4ed48de7a9f4aaca55e82843a41e50d128a499 (patch) | |
tree | 5530193ea72890abaf748118e13da28e2fdb70b5 | |
parent | edc07ef434e8d2ad0ed32453dd02e131896a9966 (diff) | |
download | nspr-hg-ed4ed48de7a9f4aaca55e82843a41e50d128a499.tar.gz |
Fix #99556. Account for change in Mac epoch time as of MSL 6. r=wtc/sfraser
-rw-r--r-- | pr/src/misc/prtime.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c index 28b1f49b..0aa6e46c 100644 --- a/pr/src/misc/prtime.c +++ b/pr/src/misc/prtime.c @@ -1583,12 +1583,13 @@ PR_ParseTimeString( secs = mktime(&localTime); if (secs != (time_t) -1) { -#if defined(XP_MAC) +#if defined(XP_MAC) && (__MSL__ < 0x6000) /* * The mktime() routine in MetroWerks MSL C * Runtime library returns seconds since midnight, - * 1 Jan. 1900, not 1970. So we need to adjust - * its return value to the NSPR epoch. + * 1 Jan. 1900, not 1970 - in versions of MSL (Metrowerks Standard + * Library) prior to version 6. Only for older versions of + * MSL do we adjust the value of secs to the NSPR epoch */ secs -= ((365 * 70UL) + 17) * 24 * 60 * 60; #endif |