Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get local timezone python

import datetime

now = datetime.datetime.now()
local_now = now.astimezone()
local_tz = local_now.tzinfo
local_tzname = local_tz.tzname(local_now)
print(local_tzname)
Source by discuss.python.org #
 
PREVIOUS NEXT
Tagged: #local #timezone #python
ADD COMMENT
Topic
Name
3+2 =