Home | History | Annotate | Download | only in test

Lines Matching refs:utc

2168         utc = FixedOffset(0, "UTC", -2)
2171 t2 = time(12, 47, tzinfo=utc)
2174 t5 = time(microsecond=40, tzinfo=utc)
2177 self.assertEqual(t2.tzinfo, utc)
2180 self.assertEqual(t5.tzinfo, utc)
2189 self.assertEqual(t2.tzname(), "UTC")
2225 self.assertEqual(repr(t2), d + "(12, 47, tzinfo=utc)")
2228 self.assertEqual(repr(t5), d + "(0, 0, 0, 40, tzinfo=utc)")
2232 self.assertEqual(t2.strftime("%H:%M:%S %Z %z"), "12:47:00 UTC +0000")
2421 # Smallest possible after UTC adjustment.
2423 # Largest possible after UTC adjustment.
2520 utc = FixedOffset(0, "UTC")
2523 t2 = datetime(2002, 3, 19, 12, 47, tzinfo=utc)
2526 self.assertEqual(t2.tzinfo, utc)
2532 self.assertEqual(t2.tzname(), "UTC")
2545 self.assertEqual(repr(t2), d + "12, 47, tzinfo=utc)")
2647 utc = FixedOffset(0, "utc", 0)
2651 utcnow = datetime.utcnow().replace(tzinfo=utc)
2686 # In POSIX (epoch 1970), that's 2001-09-09 01:46:40 UTC, give or take.
2776 # in effect for a UTC time.
2791 # At the edges, UTC adjustment can normalize into years out-of-range
2899 expected = dt - dt.utcoffset() # in effect, convert to UTC
3073 utc_real = FixedOffset(0, "UTC", 0)
3074 # For better test coverage, we want another flavor of UTC that's west of
3086 def checkinside(self, dt, tz, utc, dston, dstoff):
3092 asutc = dt.astimezone(utc)
3095 # Conversion to UTC and back isn't always an identity here,
3097 # UTC time when DST begins: the clock jumps from 1:59:59
3102 # conversion back from UTC produces.
3105 # UTC gives the 1:MM:SS standard-time spelling.
3110 # They're the same times in UTC.
3111 self.assertEqual(there_and_back.astimezone(utc),
3112 dt.astimezone(utc))
3124 # from UTC to mimic the local clock's "repeat an hour" behavior.
3138 def checkoutside(self, dt, tz, utc):
3144 # Converting to UTC and back is an identity too.
3145 asutc = dt.astimezone(utc)
3149 def convert_between_tz_and_utc(self, tz, utc):
3163 self.checkinside(dston, tz, utc, dston, dstoff)
3165 self.checkinside(during, tz, utc, dston, dstoff)
3167 self.checkoutside(dstoff, tz, utc)
3169 self.checkoutside(outside, tz, utc)
3184 # the "utc" class. This is always true for a fixed-offset tzinfo
3200 # 22:00-0900 is 7:00 UTC == 2:00 EST == 3:00 DST. Since it's "after
3211 # Similar, but map to 6:00 UTC == 1:00 EST == 2:00 DST. In that
3222 # UTC 4:MM 5:MM 6:MM 7:MM checking these
3226 for utc in utc_real, utc_fake:
3229 # Convert that to UTC.
3231 # Adjust for possibly fake UTC.
3232 asutc = first_std_hour + utc.utcoffset(None)
3233 # First UTC hour to convert; this is 4:00 when utc=utc_real &
3235 asutcbase = asutc.replace(tzinfo=utc)
3270 # Always converts UTC to standard time.
3276 # UTC 4:MM 5:MM 6:MM 7:MM 8:MM 9:MM