Skip to content

Commit 712a141

Browse files
author
Felix Cremer
authored
Only round if we want to convert to datetime
1 parent 547cc39 commit 712a141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DatasetAPI/Datasets.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function toaxis(dimname, g, offs, len)
289289
if match(r"^(days)|(hours)|(seconds)|(months) since",lowercase(get(aratts,"units",""))) !== nothing
290290
tsteps = try
291291
dec = timedecode(ar[:], aratts["units"], lowercase(get(aratts, "calendar", "standard")), prefer_datetime=false)
292-
round_datetime.(dec)
292+
prefer_datetime && round_datetime.(dec)
293293
catch
294294
ar[:]
295295
end

0 commit comments

Comments
 (0)