Lines Matching refs:fromutc
247 t = tz.fromutc(u)
341 timezone.utc.fromutc(self.DT)
343 timezone.utc.fromutc('not datetime')
346 local = tz.fromutc(utctime)
5299 self.assertRaises(TypeError, Eastern.fromutc) # not enough args
5301 self.assertRaises(ValueError, Eastern.fromutc, now) # wrong tzinfo
5303 enow = Eastern.fromutc(now) # doesn't blow up
5305 self.assertRaises(TypeError, Eastern.fromutc, now, now) # too many args
5306 self.assertRaises(TypeError, Eastern.fromutc, date.today()) # wrong type
5310 def fromutc(self, dt):
5325 got = Eastern.fromutc(start)
5329 got = FEastern.fromutc(fstart)
5332 # Ensure astimezone() calls fromutc() too.
5344 got = Eastern.fromutc(start)
5348 got = FEastern.fromutc(fstart)
5351 # Ensure astimezone() calls fromutc() too.
5437 # An experimental reimplementation of fromutc that respects the "fold" flag.
5441 def fromutc(self, dt):
5445 raise TypeError("fromutc() requires a datetime argument")
5577 def fromutc(self, dt):
5809 t_summer = Eastern2.fromutc(u_summer)
5810 t_winter = Eastern2.fromutc(u_winter)
5818 t0 = Eastern2.fromutc(u)
5820 t1 = Eastern2.fromutc(u)
5826 t = Eastern2.fromutc(u)
5830 t = Eastern2.fromutc(u)
5835 t = Eastern2.fromutc(u)
5943 def fromutc(self, dt):
5947 raise TypeError("fromutc() requires a datetime argument")
5990 # we don't use dst() in fromutc(), it is unlikely that
6123 ldt = tz.fromutc(udt.replace(tzinfo=tz))
6137 ldt = tz.fromutc(udt)
6146 ldt = tz.fromutc(udt)
6153 ldt = tz.fromutc(dt.replace(tzinfo=tz)) - shift + x
6160 ldt = tz.fromutc(udt.replace(tzinfo=tz))