imip-agent

Change of imiptools/dates.py

615:1d28f68285a3
imiptools/dates.py
     1.1 --- a/imiptools/dates.py	Tue Jul 28 00:14:57 2015 +0200
     1.2 +++ b/imiptools/dates.py	Tue Jul 28 19:27:27 2015 +0200
     1.3 @@ -368,6 +368,8 @@
     1.4          attr = {"VALUE" : "DATE-TIME"}
     1.5          if tzid:
     1.6              attr["TZID"] = tzid
     1.7 +        elif dt.tzname() == "UTC":
     1.8 +            attr["TZID"] = "UTC"
     1.9          return attr
    1.10      else:
    1.11          return {"VALUE" : "DATE"}
    1.12 @@ -376,7 +378,10 @@
    1.13  
    1.14  def get_datetime_item(dt, tzid=None):
    1.15  
    1.16 -    "Return an iCalendar-compatible string and attributes for 'dt' and 'tzid'."
    1.17 +    """
    1.18 +    Return an iCalendar-compatible string and attributes for 'dt' using any
    1.19 +    specified 'tzid' to assert a particular time zone.
    1.20 +    """
    1.21  
    1.22      if not dt:
    1.23          return None, None