Date format does not behave as expected (off by one day)
See original GitHub issueI have a template with the date specified as e.g., 2021-04-08
.
I would expect this formatting:
post.data.date | date('PPP')
To return:
April 8th, 2021
However, it returns:
April 7th, 2021
If I format with the ATOM
format, I can see that the issue seems to be related to stripping off the timezone, or something.
post.data.date | date(`ATOM')
=> "2021-04-07T20:00:00-04:00"
(I’m in GMT-4)
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Fix Excel Dates Formatted as Text - My Online Training Hub
Simply copy an empty cell > Select your date cells > Paste Special > Values & Add! No need to go back and...
Read more >How to Fix Excel Dates That Won't Change Format - Contextures
How to fix Excel dates that will not change format. Fix dates that end up in the wrong order when sorted. Use built-in...
Read more >Excel 365 online, date formatting problem.
Dear all, I have a problem with date formatting, I think it is a bug in the program but I'm not sure. When...
Read more >Is the Javascript date object always one day off?
Javascript's Date class doesn't represent a date, it represents a timestamp (same in Java). To make it a date, it uses a time...
Read more >Unable to get Excel to recognise date in column - Super User
The problem: Excel does not want to recognize dates as dates, even though through "Format cells - Number - Custom" you are explicitly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great. You can undo this change in your _config.js and use the latest stable version after releasing this.
@CM-IV If it helps, I’m using environment variables in the Lume tests to avoid different results in my computer and in GitHub actions: https://github.com/lumeland/lume/blob/master/deno.json#L3 I think it’s safer to provide the environment in the cli command.