owntracks / docker-recorder

Docker image for OwnTracks Recorder
151 stars 68 forks source link

API /last has no isolocal in docker #75

Closed jpmens closed 9 months ago

jpmens commented 9 months ago

Seen (or rather not seen) on Docker build. Sigh.

jpmens commented 9 months ago
      "tzname": "Asia/Tokyo",
      "isorcv": "2024-02-06T13:24:13Z",
      "isotst": "2024-02-06T13:24:13Z",
      "disptst": "2024-02-06 13:24:13",
      "isolocal": "2024-02-06T13:24:13+0000"

Impossible?!

How is time handled in a container ...

jpmens commented 9 months ago
/ # TZ=America/Pacific date
Tue Feb  6 13:34:21 UTC 2024

/ # TZ=Asia/Tokyo date
Tue Feb  6 13:34:56 UTC 2024

/ # ls -l /etc/localtime
ls: /etc/localtime: No such file or directory

/ # ls -l  /usr/share/zone*
ls: /usr/share/zone*: No such file or directory

That explains it.

jpmens commented 9 months ago
      "locality": "Shibuya",
      "tzname": "Asia/Tokyo",
      "isorcv": "2024-02-06T13:46:45Z",
      "isotst": "2024-02-06T13:46:45Z",
      "disptst": "2024-02-06 13:46:45",
      "isolocal": "2024-02-06T22:46:45+0900"

Fixed after installing tzdata package.