The OS time and the DB time do not match#
Overview#
During DB server operation (while Altibase is running), if the OS time zone is changed or DST is applied, the OS time and the DB (sysdate) time may not match.
In such cases, a DB restart is required to ensure accurate time synchronization.
(Note: This document is based on the Linux OS, and the methods for checking and changing settings may differ for other Unix systems.)
Version#
All versions of Altibase
Symptoms#
OS time change#
After changing the OS time, querying the time in Altibase returns the correct result.
| OS Check | Altibase Check |
|---|---|
| [root@master ~]# timedatectl set-time "2025-08-20 12:00:00" [root@master ~]# timedatectl Local time: Wed 2025-08-20 12:00:02 KST Universal time: Wed 2025-08-20 03:00:02 UTC RTC time: Wed 2025-08-20 03:00:02 Time zone: Asia/Seoul (KST, +0900) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: n/a |
iSQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS.SSSSSS') FROM DUAL; TO_CHAR(SYSDATE,'YYYY-MM-DDHH:MI:SS.SSSSSS ----------------------------------------------------------------------------------- 2025-08-20 12:00:02.267024 1 row selected |
Time Zone Change#
After changing the time zone, a time discrepancy occurs when querying the time in Altibase → DB restart is required
| OS Check | Altibase Check |
|---|---|
| [root@master ~]# timedatectl set-timezone Europe/Istanbul [root@master ~]# timedatectl Local time: Wed 2025-08-20 06:01:44 +03 Universal time: Wed 2025-08-20 03:01:44 UTC RTC time: Wed 2025-08-20 03:01:45 Time zone: Europe/Istanbul (+03, +0300) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: n/a |
iSQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS.SSSSSS') FROM DUAL; TO_CHAR(SYSDATE,'YYYY-MM-DDHH:MI:SS.SSSSSS ----------------------------------------------------------------------------------- 2025-08-20 12:01:44.679908 1 row selected. |
| Altibase restart | |
| [root@master ~]# timedatectl Local time: Wed 2025-08-20 06:03:30 +03 Universal time: Wed 2025-08-20 03:03:30 UTC RTC time: Wed 2025-08-20 03:03:31 Time zone: Europe/Istanbul (+03, +0300) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: n/a |
iSQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS.SSSSSS') FROM DUAL; TO_CHAR(SYSDATE,'YYYY-MM-DDHH:MI:SS.SSSSSS ----------------------------------------------------------------------------------- 2025-08-20 06:03:30.983508 1 row selected. |
DST (Daylight Saving Time) Application#
After DST (Daylight Saving Time) changes, a time discrepancy occurs when querying the time in Altibase → DB restart is required
| OS Check | Altibase Check |
|---|---|
| [root@master ~]# timedatectl Local time: Sun 2025-03-09 03:02:38 CDT Universal time: Sun 2025-03-09 08:02:38 UTC RTC time: Sun 2025-03-09 08:02:39 Time zone: CST6CDT (CDT, -0500) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: yes Last DST change: DST began at Sun 2025-03-09 01:59:59 CST Sun 2025-03-09 03:00:00 CDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2025-11-02 01:59:59 CDT Sun 2025-11-02 01:00:00 CST |
iSQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS.SSSSSS') FROM DUAL; TO_CHAR(SYSDATE,'YYYY-MM-DDHH:MI:SS.SSSSSS ----------------------------------------------------------------------------------- 2025-03-09 02:02:38.568618 1 row selected. |
| Altibase restart | |
| [root@master ~]# timedatectl Local time: Sun 2025-03-09 03:03:54 CDT Universal time: Sun 2025-03-09 08:03:54 UTC RTC time: Sun 2025-03-09 08:03:55 Time zone: CST6CDT (CDT, -0500) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no DST active: yes Last DST change: DST began at Sun 2025-03-09 01:59:59 CST Sun 2025-03-09 03:00:00 CDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2025-11-02 01:59:59 CDT Sun 2025-11-02 01:00:00 CST |
iSQL> SELECT TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS.SSSSSS') FROM DUAL; TO_CHAR(SYSDATE,'YYYY-MM-DDHH:MI:SS.SSSSSS ----------------------------------------------------------------------------------- 2025-03-09 03:03:54.600136 1 row selected. |
※ When performing an incomplete recovery using the until time on a server with DST applied, the time difference must be taken into account.