def test_epoch_with_localtime(self): dt = RichDateTime(2000, 12, 31, 4, 56, 7, 890, tzinfo=tzlocal()) self.assertEqual(dt.epoch(), 978238567)
def test_epoch_with_specified_timezone(self): dt = RichDateTime(2000, 12, 31, 4, 56, 7, 890, tzinfo=self.jst) self.assertEqual(dt.epoch(), 978238567)
def test_epoch_with_utc(self): dt = RichDateTime(2000, 12, 31, 4, 56, 7, 890, tzinfo=self.utc) self.assertEqual(dt.epoch(), 978238567)