now time
>>> now_time_utc = datetime.now(timezone('UTC'))
>>> now_time_utc
datetime.datetime(2019, 9, 19, 7, 14, 37, 136303, tzinfo=<UTC>)
now time to JST
>>> one_hour_ago_time_jst = now_time_utc.astimezone(timezone('Asia/Tokyo'))
>>> one_hour_ago_time_jst
datetime.datetime(2019, 9, 19, 16, 14, 37, 136303, tzinfo=<DstTzInfo 'Asia/Tokyo' JST+9:00:00 STD>)
print isoformat
>>> now_time_utc.isoformat(timespec='hours')
'2019-09-19T07+00:00'
+00:00
を消したい
replace tzinfo
>>> now_time_utc.replace(tzinfo=None).isoformat(timespec='hours')
'2019-09-19T07'