Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Cannot set timezone correctly [closed]

Hi,

Seems I cannot set the timezone in 2.6RC, the "Last inventory" field is always show in GMT even I have force it into "Asia/Hong_Kong" at php.ini. It is showing correctly in phpinfo(). 

Is there any idea about this? Thanks.

date

date/time supportenabled
timelib version2016.02
"Olson" Timezone Database Version0.system
Timezone Databaseinternal
Default timezoneAsia/Hong_Kong
DirectiveLocal ValueMaster Value
date.default_latitude31.766731.7667
date.default_longitude35.233335.2333
date.sunrise_zenith90.58333390.583333
date.sunset_zenith90.58333390.583333
date.timezoneAsia/Hong_KongAsia/Hong_Kong

Here is my OCS version info:

  • PHP Version :
  • Web Server :
  • Database Server :
  • Version OCSReports:
  • 7.0.33
  • Apache/2.4.25 (Debian)
  • Debian 9.6 version 10.1.37-MariaDB-0+deb9u1
  • 2.6RC
closed with the note: Problem solved
in OCS Inventory NG server for Unix by (210 points)
closed by

3 Answers

0 votes
 
Best answer

Same situation, Php time() gives me the right local time, but “last come” always 12 hours ahead ( ocs 2.6 on debian 10.2). At last I changed my MySQL time zone setting and the time is correct finally.

Maybe you could check your mysql time zone setting.

show variables like '%time_zone%';

https://mariadb.com/kb/en/time-zones/#global-server-time-zone

https://mariadb.com/kb/en/time-zones/#system-time-zone
 

dpkg-reconfigure tzdata

by (460 points)
selected by
0 votes
I change the server timezone before, restart the server and done.
by (240 points)
0 votes

Thanks all for the hints, it is ok now when I recheck.

MariaDB [(none)]> show variables like '%time_zone%';

+------------------+--------+

| Variable_name    | Value  |

+------------------+--------+

| system_time_zone | HKT    |

| time_zone        | SYSTEM |

+------------------+--------+

2 rows in set (0.15 sec)

Maybe a full reboot is required after all these changes to the timezone.
by (210 points)
 
Powered by Question2Answer
...