Python: added astro_time_t.Utc(). Added more testing.

This commit is contained in:
Don Cross
2019-06-23 17:50:13 -04:00
parent 8a344d251d
commit a76b069ccc
3 changed files with 11 additions and 0 deletions

View File

@@ -259,6 +259,9 @@ class astro_time_t:
n = _EPOCH + datetime.timedelta(milliseconds=millis)
return '{:04d}-{:02d}-{:02d}T{:02d}:{:02d}:{:02d}.{:03d}Z'.format(n.year, n.month, n.day, n.hour, n.minute, n.second, math.floor(n.microsecond / 1000))
def Utc(self):
return _EPOCH + datetime.timedelta(days=self.ut)
_EPOCH = datetime.datetime(2000, 1, 1, 12)
def CurrentTime():