Detail of steps attempted. Have recreated this issue on test environment as well:
https://monitoring-portal.org/index.php?thread/41235-icinga-web-2-incorrect-time-displayed-1-hour-ahead/
Expect Icinga Web 2 to follow DateTime specified in /etc/php/7.0/apache2/php.ini i.e.:
date.timezone = "Africa/Johannesburg"
This is equivalent to UTC+2 with no daylight savings
All time displayed by Icinga Web 2 reflect as UTC +3. This is for:
1 Open this file from browser
2 Observe that time stamp reflected in web-page is different (1 hour behind).
3 Similarly system date will also be 1 hour behind i.e. correct
4 Times dispalyed by Icinga Web 2 for elements is 1-hour ahead
This is only affecting users browsing objects via Icinga Web 2. Stored dates and times in MySQL are reflect the correct dates and times
Icinga Web 2 version and modules (System - About):
Icinga Web 2 - 2.4.1
Grafana - 1.1.2
Version used (icinga2 --version):
Version: r2.6.3-1
Operating System and version:
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
Enabled features (icinga2 feature list):
Disabled features: compatlog debuglog gelf graphite livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command ido-mysql influxdb mainlog notification
Config validation (icinga2 daemon -C):
information/cli: Icinga application loader (version: r2.6.3-1)
information/cli: Loading configuration file(s).
information/ConfigItem: Committing config item(s).
information/ApiListener: My API identity: sagrndvmmonm01.sagesl.za.adinternal.com
warning/ApplyRule: Apply rule 'satellite-host' (in /etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type 'Dependency' does not match anywhere!
warning/ApplyRule: Apply rule 'mail-host-notification' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Notifications.conf: 4:1-4:51) for type 'Notification' does not match anywhere!
warning/ApplyRule: Apply rule 'downtime.updates.linux.nigeria' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Downtimes.conf: 21:1-21:64) for type 'ScheduledDowntime' does not match anywhere!
warning/ApplyRule: Apply rule 'downtime.backups' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Downtimes.conf: 38:1-38:53) for type 'ScheduledDowntime' does not match anywhere!
warning/ApplyRule: Apply rule 'powershell_test' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Service.Checks.Test.conf: 4:1-4:31) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule 'Procs' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Service.Checks.Test.conf: 15:1-15:21) for type 'Service' does not match anywhere!
warning/ApplyRule: Apply rule '' (in /etc/icinga2/zones.d/- Global-Templates -/Global.Service.Checks.Windows.conf: 40:1-40:66) for type 'Service' does not match anywhere!
information/ConfigItem: Instantiated 1 ApiUser.
information/ConfigItem: Instantiated 1 ApiListener.
information/ConfigItem: Instantiated 130 Zones.
information/ConfigItem: Instantiated 1 FileLogger.
information/ConfigItem: Instantiated 73 Endpoints.
information/ConfigItem: Instantiated 4 NotificationCommands.
information/ConfigItem: Instantiated 255 Notifications.
information/ConfigItem: Instantiated 206 CheckCommands.
information/ConfigItem: Instantiated 2 Downtimes.
information/ConfigItem: Instantiated 129 Hosts.
information/ConfigItem: Instantiated 1 IcingaApplication.
information/ConfigItem: Instantiated 15 HostGroups.
information/ConfigItem: Instantiated 22 UserGroups.
information/ConfigItem: Instantiated 30 Users.
information/ConfigItem: Instantiated 704 Services.
information/ConfigItem: Instantiated 3 TimePeriods.
information/ConfigItem: Instantiated 10 ServiceGroups.
information/ConfigItem: Instantiated 1 ScheduledDowntime.
information/ConfigItem: Instantiated 1 ExternalCommandListener.
information/ConfigItem: Instantiated 1 CheckerComponent.
information/ConfigItem: Instantiated 1 IdoMysqlConnection.
information/ConfigItem: Instantiated 1 InfluxdbWriter.
information/ConfigItem: Instantiated 1 NotificationComponent.
information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
information/cli: Finished validating the configuration file(s).
If you run multiple Icinga 2 instances, the zones.conf file (or icinga2 object list --type Endpoint and icinga2 object list --type Zone) from all affected nodes.
Hi,
Thanks for providing all the information. Web 2 automatically detects the browser's time zone and uses it. If there is an issue w/ the automatic detection please open a new issue. Users may override the time zone via their preferences.
Hope this helps.
Best regards,
Eric
Also to be noted: Timezone in php.ini must match the system's timezone!
Thanks lazyfrosch and lippserd,
@lippserd , I will open a new issue in that case. My system time zone and browser time zone match the server time zone at UTC +2, however Icinga Web 2 still displays all times 1-hour ahead.
@lazyfrosch, all my php.ini files reflect the correct time zone but thanks
Same behavior for me.
Icinga2 - version: r2.8.1-1
IcingaWeb 2.5.1
Same issue for me on debian stretch:
icinga2: Installed: 2.6.0-2
icingaweb2: Installed: 2.4.1-1
Same issue for me on Ubuntu 16.04
icinga2: Installed: r2.10.1-1
icingaweb2: installed: 2.6.1
For me, time shows 1hour back from real. Timezone information is fine.
@redbob365 This has been fixed in version 2.6.2.
Most helpful comment
@redbob365 This has been fixed in version 2.6.2.