This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Time Stamps For Executables?


While playing around with problems with getting Rsync to work over daylight
savings time shifts, I discovered some other wierdness in the way Windows
generates time values for files under WinXP, FAT, and Cygwin.

I created a series of text files in my home directory:

touch hello.txt
touch hello.exe
touch hello.htm

If you run a stat tool on each file you get the same date and time on each

Next, if you change the time zone of the computer, the .txt and .htm files
will have a different time stamp to the .exe file???

I read somewhere on this mailing list a discussion where someone was
compiling source code and getting binaries with different MD5sum values with
the same sources. They said PE executables contain a time stamp at the front
or something.

Does the stat() call under Cygwin implement this or is this another
"feature" of the crazy Win32 date time API function calls? From what I can
tell it looks like the PE header might contain a GMT based time stamp, and
so the time of executables is always right whereas the .txt and .htm files
change their time since they rely purely on the FAT filesystem.

Does anyone have any idea on what this is? I'm not sure if its a bug in
Cygwin or Win32 but thought I'd mention it in case it causes problems for
other applications?


Wayne Piekarski - PhD Researcher / Lecturer      pho:        +61-8-8302-3669
                                                 fax:        +61-8-8302-3381
Tinmith Project - Wearable Computer Lab          mob:           0407-395-889
Advanced Computing Research Centre               ema:  wayne at cs dot unisa dot edu dot au
University of South Australia                    www:

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]