rascunho

commit 38f68ecdb83ef207bd82472d05d776729ac733b0

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

Replace timezone with pytz

 core/app.py | 6 +++---


diff --git a/core/app.py b/core/app.py
index cc2ecfe8598e46b9c51fff0f2ee12a922c4e6bb2..fd8c81f86e67b69337933eaef650c05fdbfc6af0 100644
--- a/core/app.py
+++ b/core/app.py
@@ -6,7 +6,7 @@ from core.database import db, init_database
 import mistune
 import humanize
 from datetime import datetime, timedelta
-from dateutil import tz
+from pytz import timezone
 
 class Rascunho(Flask):
     def __init__(self, *args, **kwargs):
@@ -35,8 +35,8 @@         def human_date(d):
             if not d:
                 return 'Nunca'
 
-            local_tz = tz.gettz(read_from_config("timezone"))
-            d = d.replace(tzinfo=tz.gettz('UTC'))
+            local_tz = timezone(str(read_from_config("timezone")))
+            d = d.replace(tzinfo=timezone('UTC'))
             local_date = d.astimezone(local_tz)
 
             if isinstance(d, timedelta):