Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Preserve timestamps when copying from FAT to HFS+ System
Imagine you have made a world tour in August 2009 (summer time!) and you have used your digital photo camera to create pictures, videos and voice recordings.

In this guide I will not refer to these items by their specific characteristics (photo, video, audio), but simply regard all of them as "files." Secondly, we assume that the files are saved on a storage medium, which is very likely formatted as FAT (as specified in the DCIM standard for digital cameras).

You have created three files in America/Los Angeles (UTC-0700), three files in your hometown Europe/Vienna (UTC+0200) and three files in Asia/Bangkok (UTC+0700), and at the end of the summer, you return to your hometown Europe/Vienna.

This guide shows you how to correctly bring your files' timestamps from a local time zone-based file system (such as your external flash drive, formatted as FAT32) to a file system using coordinated universal time (UTC) (such as your internal hard disk, formatted as HFS+) using the Finder on MacOS X.

Technical background regarding time stamps:

Some file formats have room for metadata where they can keep temporal data, i.e. JPEG has EXIF. Other file formats may not record any temporal information in the file itself, so the only temporal data which we have then is the file's timestamp in the file system. Some timestamp formats may consider a local time zone when saving, some may consider UTC. And besides this, some may state which time zone they have used, either UTC or another specific local time zone, and some may not state this at all!

Hence a lot of guesswork/uncertainty remains to the consumer level end user, thanks to a suboptimal (or call it worse...) set of technical standards related to digital cameras and time stamps:

Design rule for Camera File system:
  • Uses DOS FAT as the file system, which uses local time zone timestamps.
  • Offtopic: 8.3 naming scheme IMG_1234.JPG etc, which has many downsides, but this is another topic.
  • Definitely not a well-thought-out standard to reliably save human cultural heritage for all too long! Just consider it from that perspective ... horrible.
Exchangeable image file format (EXIF):
  • Stores the time stamp in a local time zone in the tag DateTimeOriginal.
  • There is a method to state the time zone by using the EXIF tag GPSTimeStamp, which is specified in UTC. Therefore the time zone can be deduced as the difference between GPSTimeStamp and DateTimeOriginal timestamp. But sadly, this is rarely used by hardware or software. More about this subject.
Effect on copying between file systems with different time zones:

When FAT (and also EXIF) creates a time stamp, it considers the local time zone of where the file creation occurs! When you later copy a set of file(s) which were all created in the same time zone from a local time zone-based file system (such as FAT) to a UTC-based file system (such as HFS+), the computer cannot know what the time zone of those files was on the local time zone based file system.

If you want to get the correct results, your system time zone must be set to the time zone where the file was created, so that when you copy the file, the correct time zone transformation is performed.

The issue is even more complicated when you create files in different time zones, but on only a single local time zone based file system volume (such as FAT). If you would copy all those files, with their different time zones, at once to a UTC-based file system (such as HFS+), they will all be transformed with the same time zone offset (from their local time zone to the file system's UTC time zone), even though they have different offsets, and therefore some/all might end up with false time stamps.

How to preserve the correct time stamps when copying files:

When copying files from a FAT volume to an HFS+ volume, here's how to preserve the time stamps on the source files:
  1. Process for one set of files originating from the same time zone:
    • Set your system time zone to the time zone of the fileset which you want to copy (i.e the Los Angeles files). System Preferences » Date & Time » Time Zone.
    • Connect the external FAT volume.
    • Copy only the files that were created in the time zone that matches your current system time zone. (In our example, only copy the Los Angeles files).
    • Important: Disconnect the external FAT volume.
  2. Repeat the process for each additional time zone file set:
    • If all of your files were from the same time zone, you are already done. Jump to step three.
    • If you have files from multiple time zones, repeat step one above for each of those files. Be sure to not forget to disconnect the drive in between time zone changes, otherwise you will get false results.
  3. Finish the process: After having copied all time zone files, set your system time zone back to your actual physical time zone.
To be noticed after the process:

What is important to understand is that if you watch the files in the Finder, the date/time you see beneath them is the time that it was created in your actual system time zone. This only matches the local date/time of the file creation if it was taken in the same time zone as your system time zone. In all other cases, where the creation time zone is not your system time zone, there will be an offset.

In case you are not sure whether the time stamps are trustworthy, just temporarily set your system time zone to the time zone where the file in question was created. Watch the suspect file(s) in the Finder, and the shown date/time must be the same as the creation date/time. Otherwise, there must have been an error somewhere in your previous manipulation process. After that, turn your system time zone back to your physical time zone, and the display offset will be there again. 2br Mac OS X only displays a valid modification date, and a bogus creation date for files from FAT Volumes. According to this article, FAT saves time stamps for Creation, Modification, and Access. Mac OS X seems to only regard the modification date. This is a bug/issue which is out of the scope of this hint, but I offer some steps for those who are further curious.

I suggest that, after you successfully transfer your files from FAT to HFS+, you copy the files' modification timestamps to the creation timestamps with software such as ABetterFinderAttributes. If you later alter one of those files (i.e. photo editing), its modification date will change, but at the same time, it still has a creation date, allowing you to answer both the questions: When was the file originally created, and when did I manipulate it last?

If you don't take the above step, then you could only know when you edited the filed last, but not when it was originally created. (Except, of course, if you have non-file system information available, such as EXIF data in JPEG picture files.)
  • Currently 2.56 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (16 votes cast)

Preserve timestamps when copying from FAT to HFS+ | 6 comments | Create New Account
Click here to return to the 'Preserve timestamps when copying from FAT to HFS+' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Preserve timestamps when copying from FAT to HFS+
Authored by: deef on Oct 29, '09 09:30:25AM

I wish I'd read this before I brought 3 GB of files accumulated over 10 weeks in South Africa this summer....

Any suggestions for a way to change existing file dates / times on OS X en masse?

[ Reply to This | # ]
Change file names or EXIF times
Authored by: Dr. T on Oct 29, '09 09:57:41AM

EXIFRenamer is a free utility that can change the dates of a batch of photos to a user-specified version of the EXIF creation date. It cannot change the EXIF data.

ShootShifter and A Better Finder Attributes claim to be able to change EXIF data. I haven't used them, so I cannot say how well they work. Search VersionTracker for "EXIF" to find other possibilities.

[ Reply to This | # ]
Preserve timestamps when copying from FAT to HFS+
Authored by: adrianm on Oct 29, '09 10:43:43AM

If you're using iPhoto, you can batch correct the time in a number of photos at once (eg if grouped by location, and therefore by TZ).

Photo menu, Adjust Date & Time...

I normally use it for re-sequencing images shot from different cameras with slightly different times.

~/.sig: not found

[ Reply to This | # ]
Preserve timestamps when copying from FAT to HFS+
Authored by: beepotato on Oct 29, '09 04:23:18PM

Wouldn’t a simpler solution be to never change the time (and time zone) on your camera while you travel?
Always leave it set to your home time zone, and all your pictures will have correct dates when you transfer them to your computer once back home.

[ Reply to This | # ]
Preserve timestamps when copying from FAT to HFS+
Authored by: porg on Nov 05, '09 08:31:44AM

@beepotato : Your suggested method is indeed very simple AND effective! Thanks!

If one wants to add timezone related informations, or if you have files from multiple timezone sources, one can nevertheless use the knowledge offered in the article.

[ Reply to This | # ]
Preserve timestamps when copying from FAT to HFS+
Authored by: jamworks on Nov 25, '09 09:42:37PM

Thanks for acknowledging "Mac OS X seems to only regard the modification date. This is a bug/issue . . .".

This has been a long standing issue for me. In the process of keeping everything organized on my Apple computer, I depend on sorting by Date Created in the Finder's List View all the time. (In fact, I consider original file creation time stamps to be sacred information, to be preserved through years of migrating data to new computers.)

I solved my issues with importing JPEG files from a digital camera by using Image Capture, instead of iPhoto. The camera's date/time stamp shows up as the Date Created on the Finder level, and therefore it is not necessary to access the EXIF data to sort by date.

However, audio files copied from my Zoom H2 Recorder, TIFF files provided on a CD, etc., and numerous other files from FAT systems, show up with only dashes in the Date Created column, and only dashes next to Created in Get Info. I'm using Mac OS 10.4.11, so last year I asked Apple Store personnel to look at examples of the same files in Leopard on one of their computers. Leopard's Finder showed December 31, 1903 as the Date Created in List View, and dashes in Get Info.

Has any of this been fixed in Snow Leopard?

[ Reply to This | # ]