-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
something newNew feature or requestNew feature or request
Description
Instant
objects omit the least representative time information when 0
. When converting them to strings, this information is not added back, resulting in differently formatted strings.
It is also not added back when rounding and specifying the required precision.
This is particularly difficult when a specific format is required.
whenever.Instant.from_utc(2025, 6, 6, 12, 10, 10, nanosecond=12456789).round("millisecond").format_common_iso()
results in
'2025-06-06T12:10:10.012Z'
whenever.Instant.from_utc(2025, 6, 6, 12, 10, 10, nanosecond=1).round("millisecond").format_common_iso()
results in
'2025-06-06T12:10:10Z'
Metadata
Metadata
Assignees
Labels
something newNew feature or requestNew feature or request