##// END OF EJS Templates
helpers: fix tzinfo can be undefined if wrong object is passed.
marcink -
r1352:7f65a6d5 default
parent child Browse files
Show More
@@ -722,11 +722,10 b" hide_credentials = lambda x: ''.join(cre"
722
722
723 def age_component(datetime_iso, value=None, time_is_local=False):
723 def age_component(datetime_iso, value=None, time_is_local=False):
724 title = value or format_date(datetime_iso)
724 title = value or format_date(datetime_iso)
725 tzinfo = '+00:00'
725
726
726 # detect if we have a timezone info, otherwise, add it
727 # detect if we have a timezone info, otherwise, add it
727 if isinstance(datetime_iso, datetime) and not datetime_iso.tzinfo:
728 if isinstance(datetime_iso, datetime) and not datetime_iso.tzinfo:
728 tzinfo = '+00:00'
729
730 if time_is_local:
729 if time_is_local:
731 tzinfo = time.strftime("+%H:%M",
730 tzinfo = time.strftime("+%H:%M",
732 time.gmtime(
731 time.gmtime(
General Comments 0
You need to be logged in to leave comments. Login now