def test_conversion(self): t = CTime(0) self.assertEqual(t.value(), 0) self.assertEqual(t.ctime(), 0) self.assertEqual(t.time(), time.localtime(0)) # These conversions depend on timezone utc = timezone('utc') local_timezone = timezone(CTime.timezone()) localized_dt = local_timezone.localize(t.datetime()) self.assertEqual(localized_dt.astimezone(utc), datetime(1970, 1, 1, 0, tzinfo=utc)) localized_d = datetime(1970, 1, 1, 0, tzinfo=utc).astimezone(local_timezone) self.assertEqual(t.date(), localized_d.date())
def getDate(self): """ The date when this RFT/PLT/... was recorded. """ ct = CTime(self._get_date( )) return ct.date()
def date(self): """ The date when this RFT/PLT/... was recorded. """ ct = CTime(cfunc_rft.get_date(self)) return ct.date()
def date(self): """ The date when this RFT/PLT/... was recorded. """ ct = CTime(cfunc_rft.get_date( self )) return ct.date()
def getDate(self): """ The date when this RFT/PLT/... was recorded. """ ct = CTime(self._get_date()) return ct.date()