From 6b762607914e1c79bc05f7e8d5cdbe6c6d7a49e4 Mon Sep 17 00:00:00 2001 From: Ali-Akber Saifee Date: Tue, 16 May 2017 04:04:45 +0200 Subject: [PATCH] Fix issue with daylight saving time + utcnow Fixes issue #2 --- hiro/patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hiro/patches.py b/hiro/patches.py index ac2d425..d85fa40 100644 --- a/hiro/patches.py +++ b/hiro/patches.py @@ -39,7 +39,7 @@ def now(cls, tz=None): @classmethod def utcnow(cls): - return cls.fromtimestamp(time.mktime(time.gmtime())) + return cls.utcfromtimestamp(time.time()) @six.add_metaclass(DateMeta) class Date(realdate):