Skip to content

Instantly share code, notes, and snippets.

@k-saka
Created May 26, 2011 16:10
Show Gist options
  • Save k-saka/993441 to your computer and use it in GitHub Desktop.
Save k-saka/993441 to your computer and use it in GitHub Desktop.
convert UTC to JTS
from dateutil import zoneinfo
def utc_to_jst(utc):
tz = zoneinfo.gettz('Asia/Tokyo')
_utc = utc.replace(tzinfo=tz)
return tz.fromutc(_utc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment