NRPT-694: fixed time zone for CMDB #794
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://bcmines.atlassian.net/browse/NRPT-694
After a lot of investigation and confusion as to the source of this issue, I realized that there are different time offsets for daylight savings, so the -7 offset is correct for dates between ~ March and ~ November. To be specific the offset during daylight savings will be -7 and the rest of the time it will be -8, so the moment library is setting the offset correctly for CSV imports as far as I can tell. Because the CSV imports do not run nightly like the other integrations, we don't have to worry about server side UTC time zone mixups. I did find one bug to fix the time zone on the CMDB CSV import, and that is the only change in this PR. If I'm missing something drastic here please let me know.