Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why doesn't toISOString include the offset? #2670

Open
thj-dk opened this issue Jun 6, 2024 · 1 comment
Open

Why doesn't toISOString include the offset? #2670

thj-dk opened this issue Jun 6, 2024 · 1 comment

Comments

@thj-dk
Copy link

thj-dk commented Jun 6, 2024

Can you help me understand why dayjs().toISOString() doesn't include the offset by default?

Given the current behaviour, shouldn't this method be named ToUtcIsoString?
Or am I wrong, expecting this method to include the offset? What are the reasons behind this behavior?

I'm aware that I can get the ISO 8601 representation including offset using format(), but it's less obvious.

@dimarixsus
Copy link

I've always thought about this as just like JavaScript new Date().toISOString()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants