Skip to content

[BUG] Modified (Last Updated) date not formatted to locale/dateformat #613

Description

@gertvdijk

Mandatory Step

  • I am using latest production release of Elegant

Recommended Step

  • I have attached link to my blog source code repository, so that developers can try to reproduce the issue at the end
  • I can't my source code but I have linked my pelican configuration files to help developers reproduce the issue

Description

Describe the bug
With a date format set in pelicanconf.py (e.g. DEFAULT_DATE_FORMAT), the Date shows up correctly, but the and Modified field shows in a fixed but dependent on LOCALE format.

Relevant pelicanconf.py:

DEFAULT_DATE_FORMAT = ('en_US.UTF-8', '%d %b %Y, %H:%M')

Article Markdown:

Date: 2014-10-30 12:00
Modified: 2017-08-03 0:00

I expect both fields to show the same, but they don't, as can be seen below in the screenshot.

To Reproduce

See description.

Expected behavior
Be consistent in date formatting to both Publish time and Modified time.

Screenshots
Screenshot from 2020-05-30 13-38-02

Desktop (please complete the following information):

not relevant

Smartphone (please complete the following information):

not relevant

Additional context

Using Pelican 4.2.0, also master branch of Elegant is affected.

Seems only partially fixed in 1da552c for only the Published date format, so I will provide a PR with the fix to also handle this in Modified subtemplate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugWell, it shouldn’t be doing that. Let’s fix it!released

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions