Skip to content

Conversation

@Dtphelan1
Copy link
Contributor

In addressing the root cause of broken E-MEF PerformanceStatus tests, we realized that the failing tests were due to the fact that our formatDateTime function was always interpretting timestamps according to the local timezone. This is according to the moment() constructor specification found here. Also found in the moment parsing documentation is guidance on the moment.parseZone() function, which will maintain the provided timezone in the parsing of a string and default to UTC if none is provided.

This PR updates our use of moment in our formatDate functions to use this newly discovered method, leading to more robust testing fixtures on the E-MEF that don't depend on a testing machine running in the Eastern Time Zone

@Dtphelan1
Copy link
Contributor Author

Whoops this breaks more than it fixes – pushing up a more careful version of this change later 😄

@Dtphelan1 Dtphelan1 changed the title Defer to the timeZone provided, default to UTC DRAFT: Defer to the timeZone provided, default to UTC Nov 4, 2021
@Dtphelan1 Dtphelan1 changed the title DRAFT: Defer to the timeZone provided, default to UTC dateTimeStamp now localizes to UTC Nov 5, 2021
@Dtphelan1 Dtphelan1 merged commit 0f5a8af into develop Nov 5, 2021
@Dtphelan1 Dtphelan1 deleted the fix-timezone-parsing branch November 5, 2021 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants