All ordinary users on my linux box have an issue. When they create a file using `$ touch test.txt` or using script and do `ls -ali | grep test.txt` I notice that the time of the file is one hour behind current time.
I checked system time using `$ date` command and it shows the current time. I also tried adding:
`TZ="/usr/share/zoneinfo/Europe/London" export TZ`
Then logged out and logged in again but same issue. How to fix the issue so that the new files are created with the current time?
I have CentOS release 6.6
touch command creates file one hour behind
Re: touch command creates file one hour behind
Start by yum update to get current. 6.6 is out of date and highly insecure. 6.9 is the current version.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: touch command creates file one hour behind
Some summer time setting?
Are you using NTP?
Edit: What's the output of hwclock?
Are you using NTP?
Edit: What's the output of hwclock?
-
- Posts: 1
- Joined: 2017/11/23 15:18:18
Re: touch command creates file one hour behind
first create your system time zone and define the same zone inside this file.
edit this /etc/sysconfig/clock
ZONE="America/New_York"
UTC=false
And restart the rsyslog service then it's should work.
Thanks
Jay
edit this /etc/sysconfig/clock
ZONE="America/New_York"
UTC=false
And restart the rsyslog service then it's should work.
Thanks
Jay