Fixes
This commit is contained in:
parent
00d1d47950
commit
7a8d9af43c
3 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue