You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I got a weird case of Faketime affecting/interfering with a simple date conversion, which I wouldn't expect, since it is a simple date conversion of a specific timestamp. It also seems to only happen in RockyLinux8 distro.
e.g. in Centos7:
[root@vagrant vagrant]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[root@vagrant vagrant]# date -d @1396627200
Sat Apr 5 00:00:00 +08 2014
#utc date -08:00
[root@vagrant vagrant]# date -u -d @1396627200 +%Y-%m-%dT%H:%M:00Z
2014-04-04T16:00:00Z
#utf date -08:00 with faketime matches, all good
[root@vagrant vagrant]# LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 date -u -d @1396627200 +%Y-%m-%dT%H:%M:00Z
2014-04-04T16:00:00Z
But in RockyLinux8 distro:
[root@vagrant vagrant]# cat /etc/centos-release
Rocky Linux release 8.9 (Green Obsidian)
[root@vagrant vagrant]# date -d @1396627200
Sat Apr 5 00:00:00 +08 2014
#utc date -08:00
[root@vagrant vagrant]# date -u -d @1396627200 +%Y-%m-%dT%H:%M:00Z
2014-04-04T16:00:00Z
#utf date -08:00 with faketime is wrong now!
[root@vagrant vagrant]# LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 date -u -d @1396627200 +%Y-%m-%dT%H:%M:00Z
2014-04-05T00:00:00Z
Not sure why this happens only in RockyLinux8 , last case.
PS: I use LD_PRELOAD for a bash script, which contains above date conversions, and the bug in RockyLinux8 boils down to above case.
The text was updated successfully, but these errors were encountered:
Hello everyone, I got a weird case of Faketime affecting/interfering with a simple date conversion, which I wouldn't expect, since it is a simple date conversion of a specific timestamp. It also seems to only happen in RockyLinux8 distro.
e.g. in Centos7:
But in RockyLinux8 distro:
Not sure why this happens only in RockyLinux8 , last case.
PS: I use LD_PRELOAD for a bash script, which contains above date conversions, and the bug in RockyLinux8 boils down to above case.
The text was updated successfully, but these errors were encountered: