1
0
Fork 0
forked from github/pelican

Update readers.py

change so that DEFAULT_DATE = 'fs' makes pelican actually uses file mtime as stated in the manual (was ctime)
This commit is contained in:
A Björck 2015-12-26 19:07:41 +01:00
commit 749f85e468

View file

@ -616,7 +616,7 @@ def path_metadata(full_path, source_path, settings=None):
if settings:
if settings.get('DEFAULT_DATE', None) == 'fs':
metadata['date'] = SafeDatetime.fromtimestamp(
os.stat(full_path).st_ctime)
os.stat(full_path).st_mtime)
metadata.update(settings.get('EXTRA_PATH_METADATA', {}).get(
source_path, {}))
return metadata