Why I get wrong filetime values with win32 api (FindFilesW) ?

Dara Durum durumdara at gmail.com
Sun May 7 10:13:36 EDT 2006


Hi !

I need to get filelists from many HDD-s with more props. of files.
I used FindFilesW to get these informations.

But I have a problems with it.
When I used Find_Data tuple, and it's atime,ctime,mtime props, I get wrong
result.

I have hungarian Windows (XP), so little time diff. I have.

These method I use to get local time:

                    timeval=localtime(int(pytime))
                    pv=strftime('%Y.%m.%d %H:%M:%S',timeval)

pytime is a PyTime object that I get from the tuple.

When I use it, it is shows 2 hours lesser than normal file time (Total
Commander, File explorer).
Example: it shows 18:54, but I have 20:54.

When I modify the getting proc the time informations to:

pytime=localtime(os.path.getctime(afile))

I get good result. What I do wrong ? Please help me:

dd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060507/569f6dac/attachment.html>


More information about the Python-list mailing list