|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| Bug check: getFileModDate
|
|
|
I’ve found what appears to be a bug in getFileModDate:
1. In Windows, find a file with a modification date between 12 pm and 1pm.
2. in Maxscript run a “getFileModDate” on that file.
The time comes back as AM instead of PM.
e.g. Windows timestamp “2/2/2012 12:21:11 PM” becomes “2/2/2012 12:21:11 AM”
If you run the same test on a file with a timestamp between 12 and 1 AM, the 12 becomes 0.
e.g. Windows timestamp “11/11/2011 12:23:00 AM” becomes “11/11/2011 0:23:00 AM”
Can someone else confirm this (i.e., it’s not just something odd with my network/servers/time settings/etc.)?
Thanks,
-Scott
|
|
|
sgoffman 03 February 2012 06:24 AM
I’ve found what appears to be a bug in getFileModDate:
1. In Windows, find a file with a modification date between 12 pm and 1pm.
2. in Maxscript run a “getFileModDate” on that file.
The time comes back as AM instead of PM.
e.g. Windows timestamp “2/2/2012 12:21:11 PM” becomes “2/2/2012 12:21:11 AM”
If you run the same test on a file with a timestamp between 12 and 1 AM, the 12 becomes 0.
e.g. Windows timestamp “11/11/2011 12:23:00 AM” becomes “11/11/2011 0:23:00 AM”
Can someone else confirm this (i.e., it’s not just something odd with my network/servers/time settings/etc.)?
Thanks,
-Scott
This is not just you. I filed a bug for this just the other day. You can use a dotnet alternative in its place. I’ll hook you up with the code for that when I return to work.
Randall Hess
Senior Technical Animator
THQ, Volition Inc.
|
|
|
|
The dotNet version returns the correct time.
(((dotNetClass "System.IO.File").GetLastWriteTime("filestring.txt")).ToString ( 'g' ))
Randall Hess
Senior Technical Animator
THQ, Volition Inc.
|
|
|
|
That’s perfect, thanks Randall!
|
|
|
|
|
|