MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_DateFormatter_settz

Function test_DateFormatter_settz

lib/matplotlib/tests/test_dates.py:1404–1413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1402
1403
1404def test_DateFormatter_settz():
1405 time = mdates.date2num(datetime.datetime(2011, 1, 1, 0, 0,
1406 tzinfo=mdates.UTC))
1407 formatter = mdates.DateFormatter('%Y-%b-%d %H:%M')
1408 # Default UTC
1409 assert formatter(time) == '2011-Jan-01 00:00'
1410
1411 # Set tzinfo
1412 formatter.set_tzinfo('Pacific/Kiritimati')
1413 assert formatter(time) == '2011-Jan-01 14:00'

Callers

nothing calls this directly

Calls 1

set_tzinfoMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…