`timeZone: "client"` throws `RangeError: Invalid time value` when rendering a post path

Open
#1,025 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, node.js
Domain
api, backend

Research direction

Read util/lib/date.js, especially getDateTokenValues at line 131 and the getDate branch at line 95, then compare their behavior with docs/configuration/time-zone.md. Reproduce the failure through renderPath for timeZone: "client" and "local"; determine whether path tokens should support client or the documentation should clarify that they do not, and make the chosen behavior consistent.

Written by the indexing model from the issue text.

Description

getDateTokenValues (util/lib/date.js:131) special-cases only "server" and passes
anything else to formatDate. Measured through renderPath:

timeZone result
UTC, Europe/Brussels path returned
client, local RangeError: Invalid time value

client is the first documented value in docs/configuration/time-zone.md, and getDate
has a branch for it (date.js:95). Nothing validates application.timeZone at startup.

Which did you intend — a client branch in getDateTokenValues, or client not applying to
path tokens, making the docs wrong? Happy to PR either.

Dominant language
JavaScript
Stars
392
Forks
39
Avg merge
22h 29m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getindiekit/indiekit

All issues in getindiekit/indiekit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.