Leider funktioniert die Formatierung im Kommentar nicht:-(
# Return local time (hrs: int, mins: int, secs:float)
@property
def local_time(self):
t = self.epoch_time + int(3600 * self.local_offset)
_, _, _, hrs, mins, secs, *_ = self._localtime(t)
return hrs, mins, secs
@property
def date(self):
t = self.epoch_time + int(3600 * self.local_offset)
y, m, d, *_ = self._localtime(t)
return d, m, y - 2000
@property
def utc(self):
t = self.epoch_time
_, _, _, hrs, mins, secs, *_ = self._localtime(t)
return hrs, mins, secs
def time_string(self, local=True):
hrs, mins, secs = self.local_time if local else self.utc
return '{:02d}:{:02d}:{:02d}'.format(hrs, mins, secs)
def date_string(self, formatting=MDY):
from .as_GPS_utils import date_string
return date_string(self, formatting)