Created
September 17, 2017 16:19
-
-
Save ilyasProgrammer/8c772412dfca3ab098f6288a33717b95 to your computer and use it in GitHub Desktop.
Timezone datetime UTC odoo convertation fix
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
tzinfo = pytz.timezone(self._context.get('tz', 'utc') or 'utc') | |
self.start_time = tzinfo.localize(my_date_time).astimezone(pytz.UTC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment