ConfusedLuigi ConfusedLuigi - 1 year ago 77
Python Question

Get right timezone information when using

I'm trying to get the date in format but for MT time in Python 2.7.

If you suggest using a library please explain how to install it. Thanks.

Answer Source
from pytz import timezone
from datetime import datetime'US/Mountain'))

That's what you probably need. As for installing the library, just pip install pytz

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download