mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-19 06:17:03 -04:00
Python: added astro_time_t.Utc(). Added more testing.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user