Missing timezone causes post date/times to be UTC 0000 offset
Closed this issue · 1 comments
Describe the bug
Date formatting may be reporting the wrong day
To Reproduce
The S0AndS0/100-days-of-code
repository has two collection posts within the linked to ref-hash b540d61b6085baa9207f334c7cb5b2086857ba48
-
rounds/_r000/000_bash-date-calculations.md
has a date of2020-04-27 21:08:27 -0700
-
rounds/_r000/001_bash-padding-strings.md
has a date of2020-04-28 10:47:52 -0700
When the site is built both posts report the date of Apr 28, 2020
within the collection list page r000.html
and each post also reports Apr 28, 2020
HTML snip from
/r000.html
<span class="post-meta">Apr 28, 2020</span>
HTML snip from
/r000/000-bash-date-calculations/
<time class="dt-published" datetime="2020-04-28T04:08:27+00:00" itemprop="datePublished">Apr 28, 2020</time>
Expected behavior
Dates defined by posts should be presented when site builds with the day defined by FrontMatter
Additional context
Inspecting rounds/_r000/000_bash-date-calculations.md
vs. /r000/000-bash-date-calculations/
shows that the time of day is also changing 21:08:27
vs. 04:08:27
respectively.
Adding timezone
string to _config.yml
file as suggested by jekyll/jekyll#1069
seems to fix this. However, that setting UTC offset within individual posts doesn't seem to be respected should likely be noted somewhere within the ReadMe file of this project.
Example FrontMatter _config.yml
snip....
timezone: America/Los_Angeles
Commit 3f1ee5a93dd99cb2eedeaf8b86a55adcb8b43e87
adds timezone
notes.