diff --git a/paramecio/citoplasma/datetime.py b/paramecio/citoplasma/datetime.py index aabe3b0..c4a2e0f 100644 --- a/paramecio/citoplasma/datetime.py +++ b/paramecio/citoplasma/datetime.py @@ -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 diff --git a/paramecio/citoplasma/urls.py b/paramecio/citoplasma/urls.py index a337940..aedd78d 100644 --- a/paramecio/citoplasma/urls.py +++ b/paramecio/citoplasma/urls.py @@ -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): diff --git a/paramecio/cromosoma/extrafields/datefield.py b/paramecio/cromosoma/extrafields/datefield.py index 36d3c3b..2c60941 100644 --- a/paramecio/cromosoma/extrafields/datefield.py +++ b/paramecio/cromosoma/extrafields/datefield.py @@ -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