Page 1 of 1

Time stamp not the same with system time

PostPosted:Wed Jan 18, 2023 9:05 am
by ndlas_dec
I am running OpenKM 6.3.11 on a virtual machine for testing purposes.

I have noticed that the timestamp on the database is different from the time used by MySQL server.
OpenKM timestamp2.jpg
OpenKM timestamp2.jpg (35.3 KiB) Viewed 4343 times
OpenKM system time2.jpg
OpenKM system time2.jpg (26.56 KiB) Viewed 4343 times
My time zone is (GMT+8) but the time stamp is (GMT+00:00).
The log files timezone is (GMT+8).

I hope somebody has a solution to this.

Thank you.

Re: Time stamp not the same with system time

PostPosted:Sat Feb 18, 2023 9:07 am
by jllort
That's because database connection. Usually it happens with MySQL, but not with MariaDB. Must edit the server.xml database connection with your time zone:

Sample:
Code: Select all
jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&serverTimezone=Europe/Madrid
List of possible timezones https://www.php.net/manual/es/timezones.php

Re: Time stamp not the same with system time

PostPosted:Mon Feb 20, 2023 4:13 am
by ndlas_dec
Hello jllort. I have followed you suggestion and now the database timestamp is using the system date.

Thank you.
okm_Node_Base.jpg
okm_Node_Base.jpg (48.86 KiB) Viewed 3631 times
okm_DB_time.jpg
okm_DB_time.jpg (14.89 KiB) Viewed 3631 times

Re: Time stamp not the same with system time

PostPosted:Tue Apr 18, 2023 8:36 am
by ndlas_dec
Hello Elliena43272. Is your system now OK?
Did you follow jllort's suggestion to edit the server.xml and change the
"jdbc:mysql://localhost:3306/okmdb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8&serverTimezone='your time zone'?