@@ -422,11 +422,14 @@ TEST(FormatTimeInMillisAsSecondsTest, FormatsNegativeNumber) {
422422 EXPECT_EQ (" -1234567.89" , FormatTimeInMillisAsSeconds (-1234567890 ));
423423}
424424
425+ // TODO: b/287046337 - In emscripten, local time zone modification is not
426+ // supported.
427+ #if !defined(__EMSCRIPTEN__)
425428// Tests FormatEpochTimeInMillisAsIso8601(). The correctness of conversion
426429// for particular dates below was verified in Python using
427430// datetime.datetime.fromutctimestamp(<timestamp>/1000).
428431
429- // FormatEpochTimeInMillisAsIso8601 depends on the current timezone, so we
432+ // FormatEpochTimeInMillisAsIso8601 depends on the local timezone, so we
430433// have to set up a particular timezone to obtain predictable results.
431434class FormatEpochTimeInMillisAsIso8601Test : public Test {
432435 public:
@@ -445,9 +448,8 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test {
445448 }
446449 GTEST_DISABLE_MSC_DEPRECATED_POP_ ()
447450
448- // Set up the time zone for FormatEpochTimeInMillisAsIso8601 to use. We
449- // cannot use the local time zone because the function's output depends
450- // on the time zone.
451+ // Set the local time zone for FormatEpochTimeInMillisAsIso8601 to be
452+ // a fixed time zone for reproducibility purposes.
451453 SetTimeZone (" UTC+00" );
452454 }
453455
@@ -514,6 +516,8 @@ TEST_F(FormatEpochTimeInMillisAsIso8601Test, PrintsEpochStart) {
514516 EXPECT_EQ (" 1970-01-01T00:00:00.000" , FormatEpochTimeInMillisAsIso8601 (0 ));
515517}
516518
519+ #endif // __EMSCRIPTEN__
520+
517521#ifdef __BORLANDC__
518522// Silences warnings: "Condition is always true", "Unreachable code"
519523#pragma option push -w-ccc -w-rch
0 commit comments