Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Bug check: getFileModDate
  RSS 2.0 ATOM  

Bug check: getFileModDate
Rate this thread
 
64135
 
Permlink of this thread  
avatar
  • sgoffman
  • Posted: 03 February 2012 06:24 AM
  • Total Posts: 5
  • Joined: 22 August 2006 07:00 PM

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



Replies: 0
avatar

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.

Replies: 0
avatar

The dotNet version returns the correct time.

(((dotNetClass "System.IO.File").GetLastWriteTime("filestring.txt")).ToString 'g' ))


Randall Hess
Senior Technical Animator
THQ, Volition Inc.

Replies: 0
avatar
  • sgoffman
  • Posted: 06 February 2012 04:48 AM

That’s perfect, thanks Randall!



Replies: 0