Skip to content

Commit

Permalink
fix comment on microsecond
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer committed Dec 14, 2024
1 parent eb918cc commit 89f27a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xarray/coding/cftimeindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ def _parse_iso8601_with_reso(date_type, timestr):
for attr in ["year", "month", "day", "hour", "minute", "second", "microsecond"]:
value = result.get(attr, None)
if value is not None:
# Note ISO8601 conventions allow for fractional seconds.
# TODO: Consider adding support for sub-second resolution?
if attr == "microsecond":
# convert match string into valid microsecond value
value = 10 ** (6 - len(value)) * int(value)
replace[attr] = int(value)
resolution = attr
Expand Down

0 comments on commit 89f27a5

Please sign in to comment.