We store the time as GMT in UNIX format, but we have to report it in NT, or
DOS format. The NT article you cited is not complete. The time is reported
in time zone corrected GMT or as local wall clock time depending on the
type of request. Both require the client and server agree on the time zone
configuration. Here is a quote on File Times from MSDN
If the original date and time of day are specified in the local time for
your time zone, you can convert the resulting file time to UTC by using the
LocalFileTimeToFileTime function. Always make sure the file times you set
using SetFileTime are valid UTC-based times. The FileTimeToLocalFileTime and
LocalFileTimeToFileTime functions use the current settings for the time zone
and daylight saving time. Therefore, if it is daylight saving time, these
functions will take daylight saving time into account, even if the time you
are converting is in standard time.
You should also consult Q158588
Please verify that both the client and server are set to the correct time
zone. If this does not solve the problem then please contact NetApp
customer support so we can get to the bottom of what you are seeing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mailto: hawleyr(a)netapp.com US Mail: Network Appliance Inc.
Phone: 408-822-6661 495 East Java Drive
FAX: 408-822-4521 Sunnyvale, CA 94089
-----Original Message-----
From: Marc A Levy [mailto:malevy@dnrc.bell-labs.com]
Sent: Wednesday, April 19, 2000 5:55 AM
To: toasters
Subject: Possible CIFS bug?
After the daylight savings time change a few weeks back I noticed
something odd on the drives I have mapped to a NetApp.
On a weekly basis (or so) I like to synchronize my home directory on the
NetApp with a copy I keep on my home computer. I have been using a
shareware program called "FileSync" which compares two directory trees
based on file name, size, and date. There is also a option to do a
binary compare (takes much longer, obviously).
So, on to the problem: After the time change from EST to EDT, all of
the files on the NetApp are exactly one hour older than on my home
computer.
Based on a little experimentation I did on the PC, I found that when the
option to adjust for daylight savings time is disable on the Windows NT
machine, all time appearances on the files (including the ones on filer)
change by 1 hour. A article on the MSKB states that NT stores all file
times in GMT, and converts the display based on the time zone setting on
the PC.
I am told that the NetApp stores this information in a UNIX format
where it is a 32-bit integer which is "the number of
seconds since Jan 1, 1970"
I would suspect that CIFS converts this to GMT for compliance with
Windows based on the time zone setting. It would seem there is a error
in this conversion where the GMT on the file changes with the Time Zone
setting (EST vs EDT). The calculation for GMT should be such that no
matter what your time zone setting (even if you move your filer from
EST to PST) the stamp on the file should remain constant.
So, is this a bug? or some specific problem I am having?
Thanks,
Marc