Logo Search packages:      
Sourcecode: libical version File versions  Download package

def Time::Time::timezone (   self,
  v = None 
)

Return, set (if none) or alter the timezone for this time 

Definition at line 106 of file Time.py.

00106                              :
        """ Return, set (if none) or alter the timezone for this time """
      
      origtz = icaltime_get_tzid(self.tt)

      if (v != None):
            assert(isinstance(v,StringType) )
          if (v == "UTC"):
                tz = icaltimezone_get_utc_timezone()
            del self['TZID']
            else:
            tz = icaltimezone_get_builtin_timezone(v)

            if not origtz:
              self.tt = icaltime_set_timezone(self.tt, tz)
            else:
              self.tt = icaltime_convert_to_zone(self.tt,tz)

          if (icaltime_get_tzid(self.tt) != "UTC"):
                  self['TZID'] = icaltime_get_tzid(self.tt)

        self._update_value()
      return icaltime_get_tzid(self.tt)

    def second(self,v=None):


Generated by  Doxygen 1.6.0   Back to index