Allow Apps to use local TZ

Currently it looks like the Apps all run UTC TZ, despite the host having a local TZ. This causes issues where a scheduled time needs to be set in the App.

Is there a reason why the Apps don’t all follow the host in this respect as I would expect everything to run using the same setting, which the user has set at the host level.

Cheers.

Any example we can test?

[root@ns8 the-tardis]# timedatectl
               Local time: Thu 2024-10-03 09:58:39 PDT
           Universal time: Thu 2024-10-03 16:58:39 UTC
                 RTC time: Thu 2024-10-03 16:58:39
                Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
[root@ns8 the-tardis]# runagent -m backuppc1 podman exec -ti backuppc-app date
Thu Oct  3 16:58:44 GMT 2024
[root@ns8 the-tardis]# runagent -m mail1 podman exec -ti dovecot date
Thu Oct  3 16:58:46 UTC 2024
[root@ns8 the-tardis]#

Interesting, of the 2 Apps I picked 1 is UTC, the other GMT, neither of which would help in setting a schedule in California. The one I was really testing is BackupPC.

Cheers.

@EddieA

Well, recalling NS7, that had until the end a different TZ in PHP (All versions) then the rest of the server, unless one manually set the correct PHP TZ… The default PHP TZ was UTC.

The issue showed up eg in Server Manager (NethGUI) and also in Cockpit when setting up backups, and viewing running times.

:slight_smile:

It doesn’t take containers to barf that up! The default PHP 5.x did not use any Container or any thing. It was native. Just the host used TZ was never correctly set for PHP.
Easy for any dev to overlook such details - although it should not happen.
But it should have been solved by NS7.9, which never really happened AFAIK…

From my NS7 docs:

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
Set PHP Timezone
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
config setprop php DateTimezone Europe/Zurich
signal-event nethserver-php-update
service httpd restart
service httpd-admin restart

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
2 Likes

Maybe those applications require the system timezone to be passed to the container runtime using Podman’s --tz flag. See reference: Red Hat Blog: Podman Features.

It’s not a major issue until the timezone is used to format dates displayed to the end user. Is it the case of BackupPC?

3 Likes

No, for BackupPC it’s for setting when the backups are scheduled to run, or not to run:

Because the-tardis has been on the network at least 7 consecutive times, it will not be backed up from 7:00 to 19:30 on Mon, Tue, Wed, Thu, Fri.

Cheers.

But then in my understand it is user visible, because the backups won’t run as expected. Correct?