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

Invalid date-time format during marshalling returns unquoted value. Expecting quoted value. #1009

Open
Akashr7n opened this issue Dec 8, 2023 · 2 comments

Comments

@Akashr7n
Copy link

Akashr7n commented Dec 8, 2023

(Below is example without 'Z')
Actual:
date: 2020-04-15T00:00:00

Expecting:
date: '2020-04-15T00:00:00'

@Akashr7n
Copy link
Author

@rogpeppe / @niemeyer Could you please help look into this. Am I expecting anything wrong?

@romshark
Copy link

time.Time implements encoding.TextUnmarshaler and encoding.TextMarshaler as unquoted RFC3339 (see source): https://go.dev/play/p/91Czuy75Xwl.
Why would you expect it to be quoted?

Marshaling/unmarshaling Works fine with v3: https://go.dev/play/p/9dGIFChLTDs.
Also, 2020-04-15T00:00:00 is not a valid RFC3339 timestamp https://go.dev/play/p/RtIEqzhnNRQ.

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