Last active
January 4, 2017 16:47
-
-
Save ddahan/8b68c275ca60abf545a3dd5d67b747e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_updated_time_or_datetime(time_or_datetime): | |
if time_or_datetime: | |
if is_naive(time_or_datetime): | |
return make_aware(time_or_datetime, timezone.utc) - timedelta(hours=2) | |
else: | |
return time_or_datetime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment