New
#1
Last Modified Date bug? (windows round trunc date delphi dos)
Hi there.
How about that case in attached image?
Thanks.
Last edited by jzz; 28 Apr 2011 at 20:53. Reason: Better tags
Hi there.
How about that case in attached image?
Thanks.
Last edited by jzz; 28 Apr 2011 at 20:53. Reason: Better tags
It appears explorer rounds up while the command shell 'dir' command truncates. I would say it's more of a discrepancy than a bug, but you're right. I'd rather both say the same thing.
That's a problem for me.
I need to compare a log file made by "DIR *.SQL > LOG.TXT" and downloaded files in FTP to make sure the files are updated.
I'm using delphi to make a program for this comparisons and all functions to get modifyed datetime are returning the falied time :/
Dir /T (A, C, or W) will sort the files based on Accessed, Created, or Written times, if that helps. So, the newest files will always occur before the older files.
Just use minutes and seconds. From what you showed, that's what the dir command does, no rounding I can see.
That's also what I see on my WIn 7 system.
I found this Delphi function that returns the real unrounded date and time.
http://strcpy.com/300
Thank you