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

Decode timestamp into interface{} #405

Closed
moorereason opened this issue Sep 28, 2018 · 1 comment
Closed

Decode timestamp into interface{} #405

moorereason opened this issue Sep 28, 2018 · 1 comment

Comments

@moorereason
Copy link

From decode.go:

		} else if tag == yaml_TIMESTAMP_TAG {
			// It looks like a timestamp but for backward compatibility
			// reasons we set it as a string, so that code that unmarshals
			// timestamp-like values into interface{} will continue to
			// see a string and not a time.Time.
			// TODO(v3) Drop this.
			out.Set(reflect.ValueOf(n.value))

Is there a chance of exposing timestamp decoding in the v2 branch? Perhaps via a boolean on Decoder (similar to strict mode)?

Or when does v3 come out? 😉

Ref: gohugoio/hugo#3983

@moorereason
Copy link
Author

Abandoning this issue.

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

1 participant