javascript only.Expand description
The timezone the engine’s Date sees.
Date and util.printd do not share a zone, and the difference is
structural rather than a bug in either — see super::GOLDEN_PRINTD_OFFSET_SECS.
util.printd goes through FX_LocalTime, whose daylight term is
GetDaylightSavingTA reading tm_isdst from FXSYS_localtime
(fxjs/fx_date_helpers.cpp:54-67) — and pdfium_test replaces that hook
with gmtime (testing/pdfium_test/pdfium_test.cc:2134), so the term is
always zero and printd’s shift is a flat standard offset. The engine’s
Date is not hooked: V8 resolves TZ=America/Los_Angeles through the
real zone database, per instant, daylight saving included.
That is why this module exists. A flat offset here is right for July and
an hour wrong for December, and the error is visible in the goldens: five
util_printd_expected.txt lines are winter dates, and one of them
(new Date(2525, 11, 31)) is an hour before midnight, so the hour error
prints as 12/30/2525 for an expected 12/31/2525.
Structs§
- Zone
- A local zone: a standard offset plus a rule for the daylight term.
Enums§
- Daylight
- How a zone’s daylight-saving term is decided.