-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
rhel-9.2.0, rhel-9.4
-
No
-
Important
-
ee768a30fe9099972dad04c49972c2508a208b9b
-
3
-
rhel-sst-pt-libraries
-
ssg_platform_tools
-
1
-
False
-
-
None
-
Red Hat Enterprise Linux
-
SST PT Libraries Sprint 8, SST PT Libraries Sprint 9, SST PT Libraries Sprint 10
-
None
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
We observe the tm_isdst of mktime() has changed since RHEL9.2.
Please provide the package NVR for which bug is seen:
How reproducible:
Steps to reproduce
- Using the c program to run on the RHEL9.2 above.
#include <stdio.h> #include <time.h> int main() { time_t daylight, standard; struct tm timestr; double diff; timestr.tm_year = 2012 - 1900; timestr.tm_mon = 11 - 1; timestr.tm_mday = 4; timestr.tm_hour = 1; timestr.tm_min = 30; timestr.tm_sec = 0; /* first with standard time */ timestr.tm_isdst = 0; standard = mktime(×tr); /* now with daylight time */ timestr.tm_isdst = 1; daylight = mktime(×tr); diff = difftime(standard, daylight); printf("Difference is %f hour(s)", diff/60.0/60.0); return 0; }
- gcc test.c -o test&&chmod +x test
- ./test
- we can see whether the system timezone is DST, it is always 1-hour offset.
[root@node-0 timedst_test]# cat /etc/redhat-release Red Hat Enterprise Linux release 9.4 (Plow) [root@node-0 timedst_test]# timedatectl set-timezone Europe/London [root@node-0 timedst_test]# ./test Difference is 1.000000 hour(s) [root@node-0 timedst_test]# timedatectl set-timezone Asia/Hong_Kong [root@node-0 timedst_test]# ./test Difference is 1.000000 hour(s)
Expected results
It should be no time offset like RHEL8:
[root@node-0 timedst_test]# timedatectl set-timezone Asia/Hong_Kong [root@node-0 timedst_test]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa) [root@node-0 timedst_test]# ./test Difference is 0.000000 hour(s)
Actual results
It is always 1-hour offset since RHEL9.2.