Backed out changeset 82af7163534f

(Bug 411726 -- Time offset and zone code are set wrong for some locales, r=mrbkap)
This commit is contained in:
Brian Crowder 2008-10-14 16:48:40 -04:30
Родитель 663a5603dc
Коммит aeb5f06b4b
2 изменённых файлов: 2 добавлений и 15 удалений

Просмотреть файл

@ -416,13 +416,8 @@ DaylightSavingTA(jsdouble t)
return result;
}
static jsdouble
AdjustTime(jsdouble date)
{
jsdouble t = DaylightSavingTA(date) + LocalTZA;
t = (LocalTZA > 0) ? fmod(t, msPerDay) : -fmod(msPerDay - t, msPerDay);
return t;
}
#define AdjustTime(t) fmod(LocalTZA + DaylightSavingTA(t), msPerDay)
#define LocalTime(t) ((t) + AdjustTime(t))

Просмотреть файл

@ -605,14 +605,6 @@ PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *prtm)
a.tm_mon = prtm->tm_mon;
a.tm_wday = prtm->tm_wday;
{
struct tm td;
time_t bogus = 0;
localtime_r(&bogus, &td);
a.tm_gmtoff = td.tm_gmtoff;
a.tm_zone = td.tm_zone;
}
/*
* Years before 1900 and after 9999 cause strftime() to abort on Windows.
* To avoid that we replace it with FAKE_YEAR_BASE + year % 100 and then