formatISO does not support milliseconds
See original GitHub issueI’m looking to use formatISO
to preserve the time zone, but it does not match the ISO used by JavaScript itself and there doesn’t seem to be an option to enable it:
const date = new Date();
console.log(date.toISOString())
// "2022-02-20T04:00:45.418Z"
console.log(_.formatISO(date))
// "2022-02-20T12:00:45+08:00" <-- missing 418 milliseconds
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ISO 8601 with milliseconds and Retrofit - java
Java Date has millisecond precision so I've been creating the Gson object like so: Gson gson = new GsonBuilder() .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.
Read more >luxon 3.1.1 | Documentation
A DateTime is an immutable data structure representing a specific date and ... Each DateTime instance refers to a specific millisecond of the...
Read more >How to parse JSON date format ISO 8601 to string with ...
I have tried to parse it as seen below. But I can't figure out how to get the same milliseconds like in the...
Read more >Date.prototype.toISOString() - JavaScript - MDN Web Docs
The toISOString() method returns a string in simplified extended ISO format (ISO 8601), which is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.
Read more >Using Datetime in Painless
Subtract three seconds from a numeric datetime in milliseconds ... Under most Painless contexts the current datetime, now , is not supported.
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 Free
Top 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
I’m wrong, after looking up, turns out milliseconds aren’t implemented yet. Sorry. Please review my draft if it is okay or not.
Terima kasih mas 🙏