SyncDiscs

Date/time stamps


More on date and time stamps

Date and time stamps on RISC OS are simple. There is only one date and time stamp associated with a file, corresponding to when the file was last modified (saved). It is therefore simple to compare two date and time stamps to find which is the newer, or whether they are the same.

Some other OSs have more than one date/time stamp associated with a file. These may include some or all of:

When using another OS to backup files, time stamps can become a problem. The following description relates to one of my systems.

I have a type NSLU2 NAS (network attached storage device), which runs a 'mini' unix OS. I access it using LanMan98. If you copy some files and/or directories to it and then inspect the date stamps of the copied files in a filer window using full info mode, you see that the date/time stamps correspond to the time of the copy, and not when the file was last modified. The date/time stamps therefore differ between RISC OS and the external device.

Running a SyncDiscs compare will report that all the files on the NAS (secondary directory) are newer than those in the primary directory. Very confusing! However, running a synchronisation at a later date will not copy any files unless their date/time stamp is later than the time the file was copied to the NAS, i.e. it is still the case that only changed files will be copied. There is one complicating factor. You must ensure that the following options are UNTICKED.

If either of these are ticked then there will occur lots of unnecessary copy operations.

Experiences with other devices and operating systems may be very different. It would be wise to check any devices you are using for backups to see how the time stamp behaves in each case, and set the synchronisation options accordingly.

The following was taken from a MicroSoft support page. It shows there can be inconsistencies even on the same OS when different filing systems are in use. The actual details apply to the Windows OS and NOT to RISC OS - they are included here to demonstrate the minefield of file time/date stamps when mixing filing systems.

A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC). The system records file times when applications create, access, and write to files.

The NTFS file system stores time values in UTC format, so they are not affected by changes in time zone or daylight saving time. The FAT file system stores time values based on the local time of the computer. For example, a file that is saved at 3:00pm PST in Washington is seen as 6:00pm EST in New York on an NTFS volume, but it is seen as 3:00pm EST in New York on a FAT volume.

Timestamps are updated at various times and for various reasons. The only guarantee about a file timestamp is that the file time is correctly reflected when the handle that makes the change is closed.

Not all file systems can record creation and last access times, and not all file systems record them in the same manner. For example, the resolution of create time on FAT is 10 milliseconds, while write time has a resolution of 2 seconds and access time has a resolution of 1 day, so it is really the access date. The NTFS file system delays updates to the last access time for a file by up to 1 hour after the last access.


  Syncjob files   |   Index   |   Contact  

SyncDiscs is © 2012, Chris Johnson and David Pilling
Email:chris@chris-johnson.org.uk

This document last modified on 18th December 2014

These pages are best viewed in a CSS compliant browser. For RISC OS, Netsurf would be the browser of choice.