Do any of you have experience with Python's datetime library?
I'm trying to track down a bug that may be related to parsing and the weird way that datetimes are formatted.
@Miredly tell me deets
@Miredly What's file_mod_time? Is it the st_mtime field from the result of os.stat()?
@Miredly I can't get that snippet to work at the moment but wouldn't it be better to convert the file_mod_time to a datetime and just see if the difference is greater than 86400? I think you can use datetime.fromtimestamp for that.
Also I'd probably use datetime.now() rather than today if you want it to be 24 hours.
@benofbrown I was actually doing that already,
file_mod_time = datetime.fromtimestamp(os.stat(file).st_mtime)
Sorry for the confusion. datetime.now() vs. today() may actually be the solution to my problem. That seems like the kind of thing that would result in weirdness at midnight.
@benofbrown @LogicalDash Giving it a test! Thanks for the advice!
@Miredly You're welcome! Hope it works!
@benofbrown Yes