Hi,
I have a jdbc forecast strategy where I insert data via a cron job. Inside the database these data are stored with the correct timezone.
I confirmed the time/timezone storage with other items and it looks always like they are store always with the correct local time.
Now, the forecast strategy should restore the correct value during the correct time. And here the wrong timezone is used which results in a wrong value.
e.g.
The database looks like
If I call the direct jdbc value with
print(Registry.getItem("pGF_Utilityroom_Electricity_Stock_Price").getPersistence("jdbc").persistedState(datetime.now().astimezone()))
it shows me “0.11”. But if I call
Registry.getItemState("pGF_Utilityroom_Electricity_Stock_Price")
it shows me “0.12”
my jdbc persistence config looks like
Strategies {
}
Items {
pGF_Utilityroom_Electricity_Stock_Price : strategy = forecast
}
