This commit is contained in:
Antonio de la Rosa 2017-12-06 06:24:10 +01:00
parent 00d1d47950
commit 7a8d9af43c
3 changed files with 7 additions and 3 deletions

View file

@ -148,7 +148,7 @@ def obtain_timestamp(timeform, local=False, tz=''):
#return timestamp-offset
if tz=='':
tz=environ['TZ']
tz=environ.get('TZ', 'utc')
t=arrow.arrow.Arrow(y, m, d, h, mi, s).to(tz)
@ -301,7 +301,7 @@ class TimeClass:
self.format_date_full=format_date_txt+' '+format_time_txt
self.tz=environ['TZ']
self.tz=environ.get('TZ', 'utc')
if tz:
self.tz=tz

View file

@ -50,6 +50,10 @@ def add_get_parameters(url, **args):
return url+added_url+"&".join( [x+'='+str(y) for x,y in args.items()] )
def get_actual_url():
return config.base_url[:len(config.base_url)-1]+request.path
if config.yes_static==True:
def make_media_url(file_path):

View file

@ -20,7 +20,7 @@ class DateField(PhangoField):
value=datetime.local_to_gmt(value)
elif not datetime.obtain_timestamp(value, True):
elif not datetime.obtain_timestamp(value, False):
self.error=True
self.txt_error=self.error_default