I am using stat to get the timestamp of a file. The script I am running sits in a while loop until the timestamp of the file's hour and minute match the current hour and minute. Basically nothing happens in the script until it detects that a file was updated. I am using the command:
$stamp = ctime(stat($file)->mtime);
The problem is, the timestamp of the file is one hour off from the actual system time. It is very important that this returns the correct time, if it doesn't, all my actions will be delayed an hour! Is this a daylight savings or time zone issue with ctime()?
Update: I checked the timestamp of the file using the GUI and noticed that it was off by an hour also, so maybe this is a different issue, one with the OS?