summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsdagley%netscape.com <devnull@localhost>2001-09-17 23:38:44 +0000
committersdagley%netscape.com <devnull@localhost>2001-09-17 23:38:44 +0000
commitd04169c8538de1960dced2437569177a769fdc2b (patch)
tree821271016d48b43f87a1180bc46e21c16ee1f1ad
parente307308744886f3b49464eaf68f918af02b35a0d (diff)
downloadnspr-hg-d04169c8538de1960dced2437569177a769fdc2b.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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c
index 33df013f..e31ba74b 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