Quantcast
Channel: Push to Heroku changes the modified date of unmodified file - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Push to Heroku changes the modified date of unmodified file

$
0
0

I have a project on Heroku with a file, say test.csv. I didn't make any change to this .csv file, but to my main.py file. When I do git push heroku master and try to retrieve the modified date of the test.csv via:

time.gmtime(os.path.getmtime('test.csv'))

I get the date/time of the push to heroku instead of the actual last modified date/time. I also have this project in GitHub, and the modified date/time is correct in on the website.

Wondering why it does this, and if there's any way I could get the actual last modified date of a file in Heroku.


Edit: From talking to @VonC, it appears that what I need is to get the date that the file was last committed, not modified, as the modified date will get changed every time a commit happens. Will try that.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images