Stats: Titles plot considers time zone correctly for current time

pull/12/head
Michael DM Dryden 2022-01-13 03:07:14 -05:00
rodzic bce746cc88
commit 93feb6c8f8
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -12,6 +12,7 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
Fixed
-----
- Fix database creation code for immutable SQLAlchemy 1.4 URLs
- Titles plot considers time zone correctly for current time. (Prevents negative bars in titles plot with -duration option)
----------
`0.6.2`_ - 2021-11-11

Wyświetl plik

@ -589,7 +589,7 @@ class StatsRunner(object):
if end:
last = pd.Timestamp(sql_dict['end_dt'], tz=self.tz).tz_convert('utc')
else:
last = pd.Timestamp(datetime.now(), tz='utc')
last = pd.Timestamp(datetime.utcnow(), tz='utc')
df_end = df['end']
df_end.iloc[-1] = last