How to correct creation date (1976) on hard disk?

I reformatted the HD and installed 10.4 on an iBook's hard disk without realizing that the clock date was at 1976 since the battery was exhausted. So now in Get Info it says the volume was "Created: April 1, 1976." In the classic Mac days I could run Norton Utilities and it would correct this date, but I don't know how to do it in OS X -- short of formatting the disk and going through the whole installation again. Disk Utility won't do it, nor DiskWarrior or Drive Genius. FileXaminer shows the dates but doesn't allow changing them. Anyone know how to correct such dates?

iBook G4 933MHz, Mac OS X (10.4)

Posted on Jul 19, 2008 1:40 PM

Reply
6 replies

Jul 20, 2008 2:52 AM in response to HandyMac

There is a way to do this in Terminal - I've tested it on a scratch USB drive and it seems to work. However I am not highly experienced in Unix, and if the 1976 date doesn't pose problems, I probably wouldn't try to change the internal HD with something that "seems to work!"

If you want to risk having to reformat though, we can try it. You will need an additional small utility program called SetFile, which is part of Apple's Developer Tools. Here is a reference page for it:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/SetFile. 1.html

You can get SetFile from the XCode Tools folder on your Tiger Install DVD (run the XcodeTools.mpkg package, and customize -uncheck all but Developer Tools Software). The SetFile utility is also contained in the update package you used to get to 10.4.11 - if you used Software Update there should be a file called "MacOSXUpd10.4.11PPC.pkg" in /Library/Receipts. If you used the 10.4.11 Combo Update and still have it, you can get the SetFile program from there as well.

As I said, it might be best to leave the date alone, but if you want to proceed let me know whether you can get SetFile from Developer Tools or if you want to use a 10.4.11 update package to obtain it.

Jul 20, 2008 7:58 AM in response to jsd2

After a little more experimenting (I like this stuff!), it looks like you can run SetFile directly from the mounted image of the OS X 10.4.11 Combo Update (PPC), which makes things a lot easier.

So if you want to try this, the steps for resetting the creation date on your boot volume to, say, July 19, 2008 at 4PM would be:

1. Download the [Mac OS X 10.4.11 Combo Update (PPC)|http://www.apple.com/downloads/macosx/apple/macosx_updates/macosx10411com boupdateppc.html] if you haven't already done so.

2. Double-click the .dmg file to mount the image "Mac OS X 10.4.11 Combined Update." Don't run the package - just close the little Finder window that appears.

3. Open Terminal.app in /Applications/Utilities

4. Copy/paste the following directly into the Terminal window (it is all one line):
---------------
sudo /Volumes/Mac\ OS\ X\ 10.4.11\ Combined\ Update/MacOSXUpdCombo10.4.11PPC.pkg/Contents/Resources/SetFile -d "7/19/2008 16:00" /
-------------

5. Hit Return. Enter your password when prompted (it will not echo on the screen), and hit Return again.

6. That's it! If there were no error messages, recheck the creation date of the boot volume in GetInfo.

==========

But again, although this "seems" as if it would work, and the risk "seems" small , I just learned about it, and I don't know enough to vouch for it. So whether it is worth doing is up to you!

Jul 20, 2008 1:18 PM in response to sig

+You need to reformat and reinstall.+

Well that's what I did, after first trying to clone the disk (with CCC), reformat, then clone it back -- which went all nuts for unknown reasons. Fortunately, all that was on the disk was the basic 10.4 install, which didn't take long to repeat.

+Norton would not correct the creation date. It would correct a modified date if that was shown as a date prior to the creation date.+

Maybe I've misremembered what it did; I'll check it again next time I set up an OS 9 Mac.

What I'd really like to find, anyway, is a utility that will do the same date correction scan in OS X that Norton did in OS 9; I've seen a few computers that'd lost their dates months ago, so had hundreds of files dated wrong.

Jul 20, 2008 1:55 PM in response to jsd2

Thanks. I looked in the 10.4.11 Combo Update and found SetFile and copied it out; Get Info says it's a "Unix Executable File" that opens with Terminal, so I'm guessing I could just double-click it and then enter the desired date. I'll try it on a newly formatted disk (with no data to be lost) sometime.

I went to see if the same SetFile utility is in the 10.5.4 Combo Update, and found it apparently can't be opened? In the contextual menu there's no "Show Package Contents" command; it's just not there. Is this some new "feature"? Pacifist just shows the contents of the Archive file, the actual update items.

I enjoy this stuff too, though I have next to no experience with command-line acrobatics (as a 20-year Mac user, I am pretty good with ResEdit, along with hundreds of other now-useless skills and knowledge).

BTW, see here for an OS X way to do what Norton used to do for bad dates (haven't tried it yet).

Jul 20, 2008 4:42 PM in response to HandyMac

Hi,

I looked at the article you listed - it uses the "touch" command which it says does change the creation date. However the manual for "touch" states instead that "The touch utility sets the modification and access times of files to the current time of day." I tried it, and it does not seem to change the creation date of my test volume.

With regard to SetFile-

it's a 'Unix Executable File' that opens with Terminal, so I'm guessing I could just double-click it and then enter the desired date.


No, that won't work - you will just get a description of the parameters that you need to supply. SetFile has no user interface once executed - it is really a command just like other Terminal commands , of the form
Do "this general thing", in "these specific ways", to "that particular target."

So in Terminal, you need a command line with all the instructions included at the beginning, i.e

"path-to-SetFile" (execute the program which sets attributes of files) "-d" (specifically the create-date attribute) "7/19/2008 16:00" (using this particular date) "/" (using this path for the target -in this case "/" means the boot volume.)

I used "sudo" at the beginning because a bootable disk is owned by the system, and you need "root" privileges to modify it in this way.

If you want to try it in the future, you could could still use the method I outlined - mount the Combo Update disk image, copy-paste the single line I gave you into Text-Edit and change the date between the quotes, and then copy-paste the line into Terminal. For a different target disk, don't hit return yet - instead use the delete key to delete the final "/" on the command line, and then drag in the volume icon that you want as the target into the Terminal window. Click inside the Terminal window and hit return. I think this would be easier than trying to construct a command line from the beginning - Unix is case-sensitive, and doesn't like spaces in filenames.

Good luck in any event! 🙂

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to correct creation date (1976) on hard disk?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.