.utc().format() returns wrongly formatted output
See original GitHub issueDescribe the bug
Using dayjs.utc().format()
after the dayjs
has been extended as described here returns the output "2020-12-26T21:08:04+00:00"
Expected behavior
According to the documentation executing that code should return the string "2020-12-26T21:08:04Z"
Information
- Day.js Version: 1.9.7
- OS: Linux
- Browser: Chromium 87.0.4280.88
- Time zone: +2
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
javascript - moment.js - UTC gives wrong date - Stack Overflow
By default, MomentJS parses in local time. If only a date string (with no time) is provided, the time defaults to midnight.
Read more >Parsing utc date in iso format returns local zone #306 - GitHub
The key "gotcha" here that tripped up me and others is understanding that how a date is parsed and how a date is...
Read more >Moment.JS Shows the Wrong Date! - Maggie's Blog
format() isn't giving the expected result, it is because the date was parsed with an offset, and the wrong Moment constructor function was...
Read more >A Complete Guide to JavaScript Dates (and why your date is ...
This method returns a native Date value — the number of milliseconds since midnight, Jan 1st 1970 UTC, so we need to pass...
Read more >MySQL 8.0 Reference Manual :: 12.7 Date and Time Functions
CURDATE(). Returns the current date as a value in ' YYYY-MM-DD ' or YYYYMMDD format, depending on whether the function is used in...
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
I’m happy I could help 😁
I am closing this, I will open it in the
date-io
repo. Sorry for wasting your time. Cheers