This is the mail archive of the cygwin@sourceware.cygnus.com 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]

NT/bash file timestamp mismatch (bug?)


We're using  Cygwin v1.0, on NT 4.0 SP4.  The problem:
bash and NT report two different modification times
for certain files.  

I have attached a file of this type in "bar.tz".
Please "tar zxpf bar.tz" to extract the file "addrdlg.cpp".
Then open a cmd.exe window and do: "dir addrdlg.cpp"; next
open a bash session and do "ls -l addrdlg.cpp".  There should be
a 1 hour difference.  Can anyone explain this; it seems like a
bug to me.

                       regards,
 
                       Tom Rodman 
                       Johnson Controls
 
                       Tom.Rodman@jci.com

bar.tz

--v-v------------------C-U-T---H-E-R-E-------------------------v-v--
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > uname -a
CYGWIN_NT-4.0 CMKE777 21.0 (0.14/2/2) 1999-9-13 20:44:35 i686 unknown
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > echo $CYGWIN
binmode
>                  /adm/sa/tmp
> CMKE777 adm > echo $TZ
CST6CDT
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > mount
Device              Directory           Type         Flags
c:\aut\cygwin-v1.0  /                   system       binmode
s:\adm\config\etc   /etc                system       binmode
\\cmke755\scm       /mnt/755s           system       binmode
s:\prep             /prep               system       binmode
s:\user             /user               system       binmode
s:\adm              /adm                system       binmode
c:\aut              /aut                system       binmode
c:                  /drv/c              system       binmode
s:                  /drv/s              system       binmode
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > /bin/ls -l addrdlg.cpp
-r--r--r--   1 adm      Domain U     1122 Sep  2 08:24 addrdlg.cpp
>                  /cygdrive/c/WINNT/profiles/build/Desktop 
> CMKE777 adm > /contrib/bin/perl /adm/bin/sys/Stat addrdlg.cpp
addrdlg.cpp:mtime:936278694:Thu Sep  2  8:24:54 CDT 1999
addrdlg.cpp:atime:950640906:Tue Feb 15 12:55:06 CST 2000    
addrdlg.cpp:ctime:949588526:Thu Feb  3  8:35:26 CST 2000    
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > cat /adm/bin/sys/Stat
#!/bin/perl
# gives timestamp info to the second for files listed on commandline
require("ctime.pl");
 
foreach $filename (@ARGV) {
 
open(INFILE,$filename);
 ($dev,$ino,$mode,undef,undef,undef,undef,undef,
    $atime,$mtime,$ctime )= stat INFILE ;
 
 $mdate = &ctime($mtime);
 $adate = &ctime($atime);
 $cdate = &ctime($ctime);
 
 print "${filename}:mtime:$mtime:$mdate";
 print "${filename}:atime:$atime:$adate";
 print "${filename}:ctime:$ctime:$cdate";
}
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > c:/aut/perl5/bin/perl -v  # non-Cygnus perl
 
This is perl, version 5.003_07
 
Copyright 1987-1996, Larry Wall
 
        + suidperl security patch
        Win32 port Copyright (c) 1995-1996 Microsoft Corporation.
                All rights reserved.
        Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
         
Perl for Win32 Build 315 - Built 09:33:08 Dec 31 1997
                 
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.
 
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > /aut/perl5/bin/perl /adm/bin/sys/Stat addrdlg.cpp
addrdlg.cpp:mtime:936275094:Thu Sep  2  7:24:54 CDT 1999
addrdlg.cpp:atime:950640826:Tue Feb 15 12:53:46 CST 2000
addrdlg.cpp:ctime:949588526:Thu Feb  3  8:35:26 CST 2000   
>                  /cygdrive/c/WINNT/profiles/build/Desktop
> CMKE777 adm > cmd /c dir addrdlg.cpp
 Volume in drive C has no label.
 Volume Serial Number is 84A4-C80E
 
 Directory of c:\WINNT\profiles\build\Desktop
 
09/02/99  07:24a                 1,122 addrdlg.cpp
               1 File(s)          1,122 bytes
                          2,167,366,144 bytes free


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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