Skip to content

Validate specified timezone against IANA database #8832

@jmooring

Description

@jmooring

Case 1: Site Configuration

If an invalid timeZone is specified in the site configuration, the failure is silent. Example:

timeZone = "America/LosAngeles"   # Should be America/Los_Angeles

Case 2: Time Function

If an invalid timezone is specified as the optional second argument to the time function, the failure is also silent (the build continues without error or warning). However, the error is rendered on the page (easy to miss and then inadvertently deploy). Example:

{{ time "2020-07-31T09:29:26" "America/LosAngeles" }}

This renders:

unknown time zone America/LosAngeles

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions