Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

localize timezone python

import pytz
from datetime import datetime

tz = pytz.timezone('Asia/Kathmandu')
datetime = datetime.now()
new_date = tz.localize(datetime)
Source by discuss.python.org #
 
PREVIOUS NEXT
Tagged: #localize #timezone #python
ADD COMMENT
Topic
Name
9+5 =