Commit 8387ad79 authored by Aurélien Campéas's avatar Aurélien Campéas
Browse files

latest_insertion_date: return a pandas timestamp set at UTC

parent c95f5356f2f8
......@@ -277,9 +277,14 @@ class TimeSerie(SeriesServices):
def latest_insertion_date(self, cn, seriename):
cset = self.schema.changeset
tstable = self._get_ts_table(cn, seriename)
sql = select([func.max(cset.c.insertion_date)]
).where(tstable.c.cset == cset.c.id)
return cn.execute(sql).scalar()
sql = select(
[func.max(cset.c.insertion_date)]
).where(
tstable.c.cset == cset.c.id
)
return pd.Timestamp(
cn.execute(sql).scalar()
).astimezone('UTC')
def last_id(self, cn, seriename):
snapshot = Snapshot(cn, self, seriename)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment