Created
January 18, 2018 10:23
-
-
Save sleepless-se/4a8366e630f7281bb816a600543ce497 to your computer and use it in GitHub Desktop.
you can comvert ISO8601 String to Japan datetime. if you delete line 8 you can use as ISO8601 String converter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
dt="2017-09-10T07:16:50Z" | |
import datetime | |
import dateutil.parser | |
def toJpDateTimeFromISO8601String(s): | |
d = dateutil.parser.parse(s) | |
d = d + datetime.timedelta(hours=9) | |
return d | |
print(str(getDateTimeFromISO8601String(dt))[0:19]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment