jsdelivr / globalping-probe

The globalping probe code that runs on your hardware and connects to the global community network of probes
https://www.jsdelivr.com/globalping
79 stars 21 forks source link

Time zone within the container #250

Open Ernst2020 opened 1 week ago

Ernst2020 commented 1 week ago

I noticed that the container uses UTC and for me is in an incorrect timezone. As a result times in the probes log are two hours off.

There is no file TZ in /etc.

Can I adjust the timezone by creating a TZ file or would that screw up the measurement data reported by the probe?

jimaek commented 1 week ago

That's a good question. Do we rely on the time/data of the probes in any way? @MartinKolarik @alexey-yarmosh I believe no, so it should be safe for a user to overwrite it, right?

alexey-yarmosh commented 1 week ago

There are no direct usages of probe's date. So it should be ok to update the timezone. I'll check that on my probe and get back here.

Ernst2020 commented 1 week ago

Ah, it is not so easy to change the timezone, tzselect is present within the container but its result needs to be added to /root/.profile, but no editor is present. And ofcourse to make it permanent the docker image itself needs to be changed and saved.

Perhaps it is an idea for a future update to the container to automatically adjust the timezone from the geolocation data when the container starts?

alexey-yarmosh commented 1 week ago

Sources of timezone data might be different, but generally it is a good idea to adjust time to the user's one in the probe logs.