Open dilyanpalauzov opened 1 year ago
Probably something to be thought more globally and not only with a solution on each UI app.
Maybe a new parameter called timezone
which accepts timezones (e.g. UTC+2
) and the keywords client
(timezone of the client) and server
(timezone of the server). The current behavior should be the default behavior.
UTC+2
works for Germany in summer, but in winter it's UTC+1
. Maybe accept only the two keywords client/server
at all?
Would you really want this to be mixed in one sitemap? I'd imagine a single option (use device time zone/use server time zone) should normally be sufficient.
I agree with @maniac103. It would be odd to have more than one DT on a sitemap with different TZs.
But, if you guys do go with @mueller-ma's approach, be sure to consider how users will encounter timezones in the rest of OH. In particular, with working with ZonedDateTimes in rules they get the time zone name instead of the UTC offset. Where feasible it's helpful to be consistent. It may not be feasible or even relevant here but I just wanted to bring this up as a consideration.
The sitemaps shall not be changed. The server knows its timezone. The client also knows its timezone, or can be set by an option. What is missing is to convert from the timezone of the server to the timezone of the client for DateTime items.
What I'd like about the Sitemap expansion is that the setting is "hidden" from a regular app user. But adding a setting in the app seems fine to me as well.
I do not understand how is the mentioned Sitemap expansion supposed to work.
An openHAB-instance runs in one time zone and all DateTime items show the data local to that timezone. To be precise in my case I use as item definition
DateTime rd_last_change "Last change in [%1$tH:%1$tM:%1$tS h]"
.OpenHAB-Android is executed physically in another time zone. I have to perform the calculations between the timezone of where the openHAB-instance is and where openHAB-Android run, in my head.
Please add an option in openHAB-Android to convert the DateTime items’ values from the timezone, where openHAB runs, to the timezone where openHAB-Android is executed.