Skip to content

Commit 0cf4085

Browse files
committed
Merge pull request #5579 from brendene/v1.5.x
Fix #5543: Handle timezone in num2date
2 parents 8576a07 + e57053d commit 0cf4085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/dates.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def _from_ordinalf(x, tz=None):
281281
elif dt.microsecond > 999990:
282282
dt += datetime.timedelta(microseconds=1e6 - dt.microsecond)
283283

284-
return dt
284+
return dt.astimezone(tz)
285285

286286

287287
# a version of _from_ordinalf that can operate on numpy arrays

0 commit comments

Comments
 (0)