I\'m working in an environment (AWS Lambda) where import pytz doesn\'t work.
import pytz
The environment is set to UTC.
How can I get the current time in the U.
If you don't have access to pytz in your environment, maybe you have access to python-dateutil. In that case you can do:
pytz
python-dateutil
import datetime import dateutil.tz eastern = dateutil.tz.gettz('US/Eastern') datetime.datetime.now(tz=eastern)