mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
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:
parent
959f96ff53
commit
749f85e468
1 changed files with 1 additions and 1 deletions
|
|
@ -616,7 +616,7 @@ def path_metadata(full_path, source_path, settings=None):
|
||||||
if settings:
|
if settings:
|
||||||
if settings.get('DEFAULT_DATE', None) == 'fs':
|
if settings.get('DEFAULT_DATE', None) == 'fs':
|
||||||
metadata['date'] = SafeDatetime.fromtimestamp(
|
metadata['date'] = SafeDatetime.fromtimestamp(
|
||||||
os.stat(full_path).st_ctime)
|
os.stat(full_path).st_mtime)
|
||||||
metadata.update(settings.get('EXTRA_PATH_METADATA', {}).get(
|
metadata.update(settings.get('EXTRA_PATH_METADATA', {}).get(
|
||||||
source_path, {}))
|
source_path, {}))
|
||||||
return metadata
|
return metadata
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue