Skip to content

Commit 015fc18

Browse files
committed
fix forecast.now() not working
self.date and datetime were in different formats so never evaluating to TRUE
1 parent b85bfe3 commit 015fc18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

datapoint/Forecast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def now(self):
2121
now = None
2222
d = datetime.datetime.utcnow()
2323
msm = (d - d.replace(hour=0, minute=0, second=0, microsecond=0)).total_seconds() / 60
24-
if self.days[0].date == d.strftime("%Y-%m-%dZ"):
24+
if self.days[0].date.strftime("%Y-%m-%dZ") == d.strftime("%Y-%m-%dZ"):
2525
for timestep in self.days[0].timesteps:
2626
if timestep.name > msm:
2727
break

0 commit comments

Comments
 (0)