ECMA (sort of) fix to 156615, platform-dependent troubles on Solaris.

There was a check in our mini-nspr against asking the OS time services
what the DST offset was for time 0... but the check didn't do what the
comment said it did.  So we got the wrong DST offset for... (drum roll
please) the two seconds on either side of the eve of 1970 GMT.

I have a similar fix ready for prmjtime.c, but I'll wait until the
stability freeze settles down.


git-svn-id: svn://10.0.0.236/trunk@4196 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mccabe
1998-06-20 01:21:01 +00:00
parent 6f0c951205
commit 98d71cb6fb

View File

@@ -373,7 +373,7 @@ PR_DSTOffset(int64 time)
if (LL_CMP(time,>,maxtimet)) {
LL_UI2L(time,PR_MAX_UNIX_TIMET);
} else if (!LL_GE_ZERO(time)) {
} else if (!LL_GE_ZERO(time) || LL_IS_ZERO(time)) {
/* go ahead a day to make localtime work (does not work with 0) */
LL_UI2L(time,PR_DAY_SECONDS);
}