The goal of this pull request is to replace the current dates with datetime + timezone offset.
Related issue(s)
Fixes #1
Potential Modifications
Convert Datetimes to UTC
Currently, timezone offsets include +00:00, +01:00, +02:00, etc. But this modification would convert everything to be +00:00. NOTE: This will change the date of some variants such as XBB.1.5.14 which has a datetime of 2023-02-21T00:34:54+01:00 but its UTC date time is 2023-02-20T23:34:54+00:00.
Add Datetimes to variants prior to February 2021
Currently, I only modified the variants that had existing dates associated with them. I don't know if there was a reason why you chose February 2021 as the cutoff, but I don't see a reason why this couldn't be extended. I can disable the timestamp checks and run the code during the night. Then I can reenable the timestamp checks and clean up any malformed variants
Use a different datetime format string
Currently I use date.isoformat() which gives the result of 2023-02-21T00:34:54+01:00 for XBB.1.5.14. While I think this makes the most sense to follow ISO format, a more readable format string could also be used.
Testing
What steps should be taken to test the changes you've proposed?
Verify that for future variants, my code produces an equivalent datetime string value. NOTE: the test fails because there have been 2 future variant updates (DV.3.1 and BF.7.14.7); however, they produce equivalent datetime string values!
I could create a Google Sheet which verifies, for each variant, the current date part of the datetime string + timezone offset in my implementation matches the date in your implementation. I could also show which variants would have a date change.
Description of proposed changes
The goal of this pull request is to replace the current dates with datetime + timezone offset.
Related issue(s)
Fixes #1
Potential Modifications
Convert Datetimes to UTC
+00:00
,+01:00
,+02:00
, etc. But this modification would convert everything to be+00:00
. NOTE: This will change the date of some variants such asXBB.1.5.14
which has a datetime of2023-02-21T00:34:54+01:00
but its UTC date time is2023-02-20T23:34:54+00:00
.Add Datetimes to variants prior to February 2021
Use a different datetime format string
date.isoformat()
which gives the result of2023-02-21T00:34:54+01:00
forXBB.1.5.14
. While I think this makes the most sense to follow ISO format, a more readable format string could also be used.Testing
What steps should be taken to test the changes you've proposed?
DV.3.1
andBF.7.14.7
); however, they produce equivalent datetime string values!Thank you for contributing to Nextstrain!