Fixes in time

This commit is contained in:
Antonio de la Rosa 2020-01-03 17:55:18 +01:00
parent 13df174796
commit e5262a9cd5
3 changed files with 6 additions and 4 deletions

View file

@ -118,7 +118,9 @@ def now(utc=False, tz=''):
if tz=='': if tz=='':
actual=arrow.now().format(sql_format_time) actual=arrow.now().format(sql_format_time)
else: else:
actual=arrow.to(tz).now().format(sql_format_time) #actual=arrow.to(tz).now().format(sql_format_time)
utc=arrow.utcnow()
actual=utc.to(tz).format(sql_format_time)
else: else:
actual=arrow.utcnow().format(sql_format_time) actual=arrow.utcnow().format(sql_format_time)

View file

@ -16,11 +16,11 @@ class SqlClass:
cursors_connect=None cursors_connect=None
disable_pool=False disable_pool=False
pymysql_install=False pymysql_install=False
pool_size=15
def __init__(self, connection): def __init__(self, connection):
self.max_overflow=-1 self.max_overflow=-1
self.pool_size=5
self.error_connection="" self.error_connection=""
# Data of connection # Data of connection
self.connection=connection self.connection=connection

View file

@ -737,8 +737,8 @@ class WebModel:
row=False row=False
else: else:
if self.show_formatted: if self.show_formatted:
for k, col in row.items(): #for k, col in row.items():
row[k]=self.fields[k].show_formatted(col) row[k]={k:self.fields[k].show_formatted(col) for k,col in row.items()}
return row return row