From my experience, in some cases, stat
will return only the date portion of the timestamp for files whose date seems to be in the future. I created my "Poor-Man's NTP Client" to synchronize system time/date between a NFS server master and NFS client slave, partly to solve this problem.
# Poor-Mans NTP client
# Set system date/time from NFS-connected file time-stamp
# Allows immediate date setting to within 1-second synchronization
# Write to a file mounted on an NFS filesystem. Immediately read back the
# file's timestamp, and use the result to set the system clock.
# Some versions of stat will report only 'Date' portions of file timestamps if
# the file has a timestamp in the future, relative to the existing system time.
# We make sure that all timestamps will appear to be in the past by temporarily
# setting the system time to near maximum possible
date -s '31 Dec 2037' > /dev/null
echo "This file for rough setting of time on mounted hosts" > $TIMESTAMP_FILE
date -s "`stat -c "%z" $TIMESTAMP_FILE`" > /dev/null
echo "System time: "; date
I use this to set the system clock on boot of embedded systems that do not have their own non-volatile real time clock. It could also be used to get your NFS server & client(s) sufficiently synch'd that your filesystem timestamp issues go away.