I’m seeing the following behavior:
- In the main UI (at least, that’s what I think I’m looking at, it’s what runs on port 8080 with openhabian), I can analyze the history of items, which produces a nice graph.
- On my laptop (using Firefox), this shows the horizontal axis in my local timezone (GMT+2) as expected.
- On my mobile phone (using Firefox mobile), this shows the horizontal axis in the GMT/UTC timezone instead, which is unexpected.
Furthermore:
- I’m assuming that OpenHAB looks at my browser’s timezone and uses that to display graphs.
- It seems that Firefox, when “anti-fingerprinting measures” are enabled, will spoof the browser timezone and force it into UTC instead (Firefox displays incorrect time on all my websites (UTC time) | Firefox Support Forum | Mozilla Support)
- Indeed, when I enable anti-fingerprinting measures on my laptop, the graphs also start using UTC there.
- Curiously, when I disable them on my mobile, it keeps using UTC.
In any case, I wonder if I can fix this on the OpenHAB side, without having to disable all fingerprinting protection in my browser. One perfectly acceptable way for me would be to simply disable browser timezone entirely and just always use the configured timezone (since that’s where my house is, anyway). However, I could not find any way to do this.
A slightly nicer solution would be to use the browser timezone when it is meaningful and use the the configured timezone when the browser spoofs it, but I’m afraid that it might be hard to detect whether or not the timezone is accurate or not. A rough measure would be to assume that UTC/GMT means it is spoofed, but that could be annoying for users in that timezone (accessing an OpenHAB setup configured for another timezone).
I also found this related topic, which suggests that simply configuring a timezone is sufficient to fix this problem. However, I do have a timezone configured already (under Settings → System Services → Regional Settings → Time Zone), so I suspect that that other post might be applicable only to PaperUI, which I think was OpenHAB2 and I’m not using right now.
- Platform information:
- Hardware: rpi
- OS: OpenHABian
- openHAB version: 3.0.2