Convert aware datetime to different timezone with pytz

As simple as this:
localized_dt = aware_dt.astimezone(timezone('Europe/Amsterdam')) 

See http://pytz.sourceforge.net/ 


Comments

Popular posts from this blog

Handling control characters (escaping) in python for json and mysql

python port sniffer with pcapy and impacket

Django field, form and model validation process