head 1.2; access; symbols pkgsrc-2020Q3:1.1.0.4 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.2 pkgsrc-2020Q2-base:1.1; locks; strict; comment @// @; 1.2 date 2020.11.21.09.45.39; author wiz; state dead; branches; next 1.1; commitid 9den0ljxmrNJMJwC; 1.1 date 2020.04.05.06.10.28; author wiz; state Exp; branches; next ; commitid Pwl0cOGoWdLqZ93C; desc @@ 1.2 log @mozjs60: remove Use mozjs68 or mozjs78 instead. No package in pkgsrc still needs this version. @ text @$NetBSD: patch-vm_Time.cpp,v 1.1 2020/04/05 06:10:28 wiz Exp $ Always use the equivalent year to determine the time zone offset and name Reviewed-by: Jeff Walden Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1415202 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1479687 Origin: upstream Applied-upstream: 62, commit:https://hg.mozilla.org/mozilla-central/rev/ce9f1466ec78 --- vm/Time.cpp.orig 2019-07-01 09:07:44.000000000 +0000 +++ vm/Time.cpp @@@@ -247,7 +247,7 @@@@ static void PRMJ_InvalidParameterHandler /* Format a time value into a buffer. Same semantics as strftime() */ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt, - const PRMJTime* prtm, int equivalentYear, + const PRMJTime* prtm, int timeZoneYear, int offsetInSeconds) { size_t result = 0; #if defined(XP_UNIX) || defined(XP_WIN) @@@@ -280,7 +280,8 @@@@ size_t PRMJ_FormatTime(char* buf, int bu * Fill out |td| to the time represented by |prtm|, leaving the * timezone fields zeroed out. localtime_r will then fill in the * timezone fields for that local time according to the system's - * timezone parameters. + * timezone parameters. Use |timeZoneYear| for the year to ensure the time + * zone name matches the time zone offset used by the caller. */ struct tm td; memset(&td, 0, sizeof(td)); @@@@ -290,19 +291,12 @@@@ size_t PRMJ_FormatTime(char* buf, int bu td.tm_mday = prtm->tm_mday; td.tm_mon = prtm->tm_mon; td.tm_wday = prtm->tm_wday; - td.tm_year = prtm->tm_year - 1900; + td.tm_year = timeZoneYear - 1900; td.tm_yday = prtm->tm_yday; td.tm_isdst = prtm->tm_isdst; time_t t = mktime(&td); - // If |prtm| cannot be represented in |time_t| the year is probably - // out of range, try again with the DST equivalent year. - if (t == static_cast(-1)) { - td.tm_year = equivalentYear - 1900; - t = mktime(&td); - } - // If either mktime or localtime_r failed, fill in the fallback time // zone offset |offsetInSeconds| and set the time zone identifier to // the empty string. @ 1.1 log @lang/mozjs60: import mozjs60-60.8.0 I've named this mozjs60 to match what Linux distributions, in particular Debian, do. Previous versions in pkgsrc are called spidermonkey* This directory contains SpiderMonkey 60, the JavaScript engine by Mozilla. @ text @d1 1 a1 1 $NetBSD$ @