This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make TestDataFormatterObjCCF.py pass outside California
ClosedPublic

Authored by teemperor on Feb 5 2020, 3:54 AM.

Details

Summary

This test creates its dates with NSDate dateWithNaturalLanguageString which is deprecated and uses the current time zone of the machine to
interpret the input string. This causes that the created NSDate has a different value depending on the locale of the machine
and we hardcoded the value for California's time zone (PST) but the data formatter gives out the GMT value as a string.

This just replaces the use with the timezone-independent dateWithTimeIntervalSince1970 (which we also use in the rest of the test)
to make this pass independently of the time zone of the machine running the test.

Diff Detail

Event Timeline

teemperor created this revision.Feb 5 2020, 3:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2020, 3:54 AM
mib accepted this revision.Feb 5 2020, 3:56 AM

LGTM!

This revision is now accepted and ready to land.Feb 5 2020, 3:56 AM
This revision was automatically updated to reflect the committed changes.