MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FileDate, or rather Microsoft

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65164] Re: [mg65080] FileDate, or rather Microsoft
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Wed, 15 Mar 2006 23:59:43 -0500 (EST)
  • Reply-to: jfultz at wolfram.com
  • Sender: owner-wri-mathgroup at wolfram.com

My response may not do much to help you, but at least help confirm that you 
aren't crazy.

I happen to know a bit about the problem because I've fiddled with the 
Windows port of CVS, a version control system which relies on file 
time-date stamps to determine whether or not to engage in a potentially 
lengthy network transaction of comparing a local file with a file on a 
server.  In the CVS sources, there is considerable code to deal with the 
problem exactly as you outline here.

That code deals specifically with the NTFS (and a couple of other file 
systems irrelevant to this discussion) case, where time stamps are stored 
in UTC, and the non-NTFS, where time stamps are stored in local time.  I'm 
guessing that, in this case, the memory stick is storing time stamps in 
local time.

Problems with the facilities for handling this in the Windows APIs are 
discussed here...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/ba
se/file_times.asp

I'd never really connected this discussion in my head with Mathematica's 
FileDate[] functionality.  I think it would be reasonable for us to change 
the implementation of FileDate[] to compensate for the Microsoft problems.  
I'll investigate this for future development.

In the mean time, the best I can suggest is to incorporate TimeZone[] into 
your code so as to compensate for the problem.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.

On Tue, 14 Mar 2006 05:59:57 -0500 (EST), Simons, F.H. wrote:
> I apologize that this question is more a question about strange
> behaviour of Microsoft (XP and 2000, but probably all versions) than a
> question about Mathematica.
>
> I keep a lot of files on two desktop computers and two laptops, not
> connected by a network. So I use a memorystick on which I keep a copy of
> the files I am interested in and I wrote very useful program in
> Mathematica that updates any of the computers and the memorystick.
>
> That program works very fine almost always. There are only two
> exceptions: when the time changes form winter time to summer time and
> conversely. When the time change has happened, Mathematica copies ALL
> files (more than 200 MB) from the computer to the stick or conversely,
> which is very time consuming.
>
> I use the function FileDate for finding the date of the last
> modification of a file. It seems that this function takes the date as it
> is produced by Microsoft. Now you can do a small experiment. Open the
> Windows Explorer with a folder on C: and look at the time of
> modification of the files. Then change the setting of the computer from
> March to April and refresh the window of the Explorer. All times have
> been changed by one hour. Change back the month to March and the times
> again change one hour. I cannot think of any reason for this behaviour.
> But my problem is that when you do the same experiments with a folder on
> the memorystick instead of the hard disk, this does not happen. So when
> the time correction takes places, all unchanged files on my hard disk
> and the memory stick now differ one hour in time and therefore will be
> updated.
>
> Does someone have an idea how to switch off this curious behaviour of
> Microsoft?
>
> Of course I can adapt the Mathematica function FileDate, but I feel it
> is better to cure the problem at the source, i.e. the setting of
> Windows.
>
> Fred Simons
> Eindhoven University of Technology


  • Prev by Date: Re: Question: DiracDelta simplifies/integrates incorrectly?
  • Next by Date: Re: 3D-plot over a triangle
  • Previous by thread: FileDate, or rather Microsoft
  • Next by thread: Re: Fourier expansion of (Cos[t]+A Cos[3 t])^1/3