question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.utc().format() returns wrongly formatted output

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
iamkuncommented, Dec 27, 2020

I’m happy I could help 😁

0reactions
mkarajohncommented, Dec 27, 2020

I am closing this, I will open it in the date-io repo. Sorry for wasting your time. Cheers

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found