Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-13276

Time zone is handled different on Minion container image based on Ubuntu

    XMLWordPrintable

    Details

      Description

      The convention for setting time zones in container images is by setting the TZ environment variable. The Horizon and Meridian core image is based on CentOS 8 and the behavior is as the following:

      ❯ docker run --entrypoint date -e TZ=Europe/Berlin meridian
      Tue May  4 16:48:10 CEST 2021
      ❯ docker run --entrypoint date -e TZ=America/New_York meridian
      Tue May  4 10:48:22 EDT 2021
      

      As you can see the 6h time difference is set accordingly with the given TZ environment variable.

      On a Minion which is based on Ubuntu Focal the behaviour is different:

      ❯ docker run --entrypoint date -e TZ=Europe/Berlin ubuntu:focal
      Tue May  4 15:50:01 Europe 2021
      ❯ docker run --entrypoint date -e TZ=American/New_York ubuntu:focal
      Tue May  4 15:50:14 American 2021
      

      The time is always shown in UTC even the region is displayed from the TZ environment variable.

        Attachments

          Activity

            People

            Assignee:
            indigo Ronny Trommer
            Reporter:
            indigo Ronny Trommer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration