PHP Timezone should be set during initial setup of NethServer

Hi

On a fresh installed NethServer 7.7, including all updates I do notice a (small) Bug:

I am in Switzerland, TZ is Europe/Zurich. This is set in NethServer.
The Admin GUI will show eg.:

*Backup started: 19:10 *
Backup finished: 18:32

What gives?

I checked this, and it seems to be a VERY old issue:

The solution is simple:

config setprop php DateTimezone Europe/Zurich
signal-event nethserver-php-update
service httpd restart
service httpd-admin restart

This works, but it should be set already when first setting up the NethServer, as this is already used in the NethServer GUI…

PS: I am aware of the new cockpit and DO use it, but the old GUI is available and obvious right after installation…

My 2 cents
Andy

In cockpit it works after setting the timezome once in Dashboard (click on system time).

image

This sets the php TimeZone too.

Maybe we should add a configuration hint to cockpit to not forget to set the timezone?

@mrmarkuz

Hi

That WAS set - but isn’t reflected in the still used httpd-admin, and not used for the old Dashboard…

It should be set at initial setup IMHO, at least until Cockpit can completly replace the old Dashboard, and Dashboard’s removed from the initial setup…

:slight_smile:

My 2 cents
Andy

I tested now and both UIs, old and new server manager, change the php timezone as well when you change the timezone. The change is reflected in either UI (refresh browser)

I think the problem is that the timezone setting in the old server manager config wizard does not change the php timezone.

1 Like

I think you’re right and it IS the old setup wizard, as this server is very fresh…
Changing it later doesn’t occur to one, as it seems to be set correctly when viewed in either Dashboard or Cockpit.

That code should still be adapted, as it is still used when setting up NethServer…

My 2 cents
Andy

I tested again and it’s not the first config wizard. It changes the php timezone too.
So it seems only possibility to hit this bug is to cancel the first config wizard and never change the timezone in one of the UIs.
I am going to test when I do the next fresh install…

1 Like

@mrmarkuz

It could also be one of the Nethserver Modules…
One of the first things I do is set up the needed modules from https://wiki.nethserver.org/doku.php?id=modules, including your and @stephdl’s Repos…

It was only after that (and setting the backup) that I, by chance, noticed the time discrepency in the Dashboard.

My installed Modules:

Not to forget: Zabbix… :slight_smile:

PS: Why doesn’t Guacamole or Zabbix show up on this list? Stephdl’s do…

I’ll keep an eye out on that.

I think best is to compare on CLI if the values are set correctly:

System timezone:

config get TimeZone

PHP timezone:

config getprop php DateTimezone

Good idea, I’ll do that when I set up my next NethServer (Or Test NethServer…).

And keep an eye on it if a module changes that value…

1 Like

OUT of the topic of this thread but if you want to make a cockpit link to a web application this is the wiki link

https://wiki.nethserver.org/doku.php?id=userguide:how_to_call_a_custom_webpage_from_applications_section_in_cockpit

Even you can help @mrmarkuz by making a pull request to his github repository

2 Likes