Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable Offset to all DateTime items #3430

Open
dilyanpalauzov opened this issue Jun 24, 2023 · 7 comments
Open

Add configurable Offset to all DateTime items #3430

dilyanpalauzov opened this issue Jun 24, 2023 · 7 comments
Labels
enhancement Indicates new feature requests

Comments

@dilyanpalauzov
Copy link
Contributor

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.

@dilyanpalauzov dilyanpalauzov added the enhancement Indicates new feature requests label Jun 24, 2023
@lolodomo
Copy link
Contributor

Probably something to be thought more globally and not only with a solution on each UI app.

@mueller-ma
Copy link
Member

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?

@maniac103
Copy link
Contributor

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.

@rkoshak
Copy link

rkoshak commented Jul 17, 2023

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.

@dilyanpalauzov
Copy link
Contributor Author

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.

@mueller-ma
Copy link
Member

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.

@dilyanpalauzov
Copy link
Contributor Author

I do not understand how is the mentioned Sitemap expansion supposed to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

5 participants