Exemplo n.º 1
0
    def from_utc(self, date):
        """
	Given a DateTime object, it considers that
	date to be in UTC. Returns a DateTime object
	that is the UTC date converted to this timezone.
	"""
        return utc2local(date)
Exemplo n.º 2
0
    def from_utc(self, date): 
	"""
	Given a DateTime object, it considers that
	date to be in UTC. Returns a DateTime object
	that is the UTC date converted to this timezone.
	"""
	return utc2local(date)
Exemplo n.º 3
0
    def utcdate_is_dst(self, date):
        """
	Given a DateTime object, returns 1 or 0
	whether the date, expressed as a UTC date,
	would correspond to a date in this timezone
	which is daylight saving time.
	"""
        # convert utc to local
        return self.localdate_is_dst(utc2local(date))
Exemplo n.º 4
0
    def utcdate_is_dst(self, date):
	"""
	Given a DateTime object, returns 1 or 0
	whether the date, expressed as a UTC date,
	would correspond to a date in this timezone
	which is daylight saving time.
	"""
	# convert utc to local
	return self.localdate_is_dst( utc2local(date) )