Open dmschlot opened 9 years ago
FYI - We found the issue also exists on Macs. We are working on a much more complete method now that only ignores milliseconds if the system doesn't keep them. We'll post it it later this.
Thanks!
Was this ever done?
The built in compareLastModifiedTime didn't work for me. On Windows the mtime of a file is rounded to seconds. Images created by people on a Mac, on the project I'm working on, have mliliseconds. When my task runs its creates the target file, and rounds milliseconds off. Subsequent runs it doesn't realize the source hasn't changed.
For example here is the source and target mtimes it was seeing. 1446818873134 > 1446818873000
Below is the method I used:
(NOTE: The bitwise math below is to round the float to an int. It's the quickest way according to: http://jsperf.com/math-floor-vs-math-round-vs-parseint/2)
Thanks, David