Local system time vs. remote time

All,
I am a little confused about what the following item will reflect:
DateTime ActTime "Zeit: [%1$tH:%1$tM]" <calendar> (G_jdbc) {channel="ntp:ntp:local:dateTime"}
I use this time in my Habpanel view.

My assumption is, that this is the (local) time of the systems location (at home in Germany).
However, when I am travelling, it seems that this time changes as well and does not show any difference between local and time at home.

Here is my Habpanel screenshot with 1 hr time difference to Germany (Canary Islands):


I don’t get it.
Any suggestion?

I’m making an educated guess here and could be wrong.

Computers store, process, and do calculations on dates using what is called epoc. Epoc is the number of milliseconds that has passed since 1 January 1970 00:00 GMT. No matter what timezone you are in or what part of the world you are in, at this exact point in time we will both have the exact same epoc.

Now when it comes time to display a date time all kinds of math and manipulation on epoc is required to account for time zones, daylight savings rules, date/time formatting for your area, etc. But the underlying data is still just epoc.

What I think is happening is that Habpanel is either converting your epoc into string format for the timezone where your phone is in the browser, or your current timezone is passed to the Habpanel servers to display your time zone.

Hmm… thanks for your response.
I am not sure though if I get the point.

That would mean I could have another time being displayed when using the Basic UI!?

Furthermore…
What about, if I check the event logs of the ActTime item above? Because this is running locally on my raspi at home and my phone does not have any impact on the logs, the time in the log would differ from the one in the habpanel UI!?
That sounds a little unlikely, doesn’t it?

In short, yet. the Items stores the same value no matter what timezone you are in. Based on the timezone of your browser that stored value gets transformed into a String representing the date/time in your current location.

Not at all. Like I said, the value of the DateTime isn’t changing. It is being transformed based on your location. So when it gets logged the time is converted to a String for the timezone of your raspi based on the timezone configured in the OS. When it gets shown on your phone it gets converted to the time in your phone’s timezone based on the timezone configured on your phone’s OS. But in both cases, the actual “time” in the DateTime is the same: 1502470837145
The number of milliseconds since Midnight 1 January 1970 in the GMT timezone.

Now I got it - thanks for your thorough explanation.
That actually means as soon as I transform the DateTime item into a String within my openhab instance and display just this I won’t have the issue.

Thanks again, I will give it a try.