mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 22:46:20 -05:00
Using divmod to calculate date parts. Using recommended datetime.now.
This commit is contained in:
parent
f0f48164f5
commit
e7fe65258c
2 changed files with 14 additions and 27 deletions
|
|
@ -32,8 +32,9 @@ class MapFile(Base, ModelHelper):
|
|||
def __json__(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'path': self.path,
|
||||
'imported': self.imported,
|
||||
'path': self.path,
|
||||
'seconds_to_import': (seconds := seconds_to_import(self.path, self.size)),
|
||||
'size': self.size,
|
||||
'time_to_import': dates.seconds_to_timestamp(seconds_to_import(self.path, self.size)),
|
||||
'time_to_import': dates.seconds_to_timestamp(seconds),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue