You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That PR added the ability to look up an S3 versionID for a specific date, but as noted in that PR review, we really should make that feature "timestamp aware."
Definition of Done
If no as_of date is supplied when downloading files from Nextstrain's S3 bucket, the default date should be UTC datetime.now() (i.e., current timestamp) instead of the current date at midnight.
Allow user to specify a timestamp in addition to a date. If user specifies an as_of date without a timestamp, default the time to midnight UTC.
2025-01-3 update: If someone passes YYYY-MM-DD in string format (i.e., 2025-01-01), Cladetime should interpret that as datetime(2024, 1, 1, 11, 59, 59). However, if someone passes a Python datetime object without a time (i.e., datetime(2025, 1, 1, 0, 0, 0)), it's hard to interpret intent--maybe they want to use midnight as a time stamp? Therefore, in the latter case, Cladetime should not override the timestamp to 11:59:59)
The text was updated successfully, but these errors were encountered:
@elray1 Am reviewing some old tickets, and I'm not sure I stated the first "definition of done" item correctly.
Cladetime now works exclusively in UTC time, but it sounds like if someone specifies a date w/o a time, the most helpful behavior would be to use 23:59 UTC as the timestamp instead of midnight.
Resolves#24
When someone instantiates a CladeTime object using string-based
date formats (YYYY-MM-DD) for sequence_as_of or tree_as_of,
set the corresponding timestamp to 11:59:59 to ensure that the
entire day is included when searching for S3 object versions
that match the date.
This is a follow up to #23
That PR added the ability to look up an S3 versionID for a specific date, but as noted in that PR review, we really should make that feature "timestamp aware."
Definition of Done
as_of
date is supplied when downloading files from Nextstrain's S3 bucket, the default date should be UTCdatetime.now()
(i.e., current timestamp) instead of the current date at midnight.as_of
date without a timestamp, default the time to midnight UTC.2025-01-3 update: If someone passes YYYY-MM-DD in string format (i.e., 2025-01-01), Cladetime should interpret that as
datetime(2024, 1, 1, 11, 59, 59)
. However, if someone passes a Pythondatetime
object without a time (i.e.,datetime(2025, 1, 1, 0, 0, 0)
), it's hard to interpret intent--maybe they want to use midnight as a time stamp? Therefore, in the latter case, Cladetime should not override the timestamp to 11:59:59)The text was updated successfully, but these errors were encountered: