Skip to content

fix: accept named timestamp and date types in ToTime - #379

Open
Twiink wants to merge 1 commit into
spf13:masterfrom
Twiink:fix/time-cast-named-values
Open

Twiink wants to merge 1 commit into
spf13:masterfrom
Twiink:fix/time-cast-named-values

Conversation

@Twiink

@Twiink Twiink commented Nov 23, 2026

Copy link
Copy Markdown

ToTimeE rejects a named integer supplied by application code, even though it supports the underlying Unix-seconds type. The same mismatch affects named strings passed to ToTimeInDefaultLocationE. Reuse the alias resolver already used by ToDurationE and pass through the caller's location.

The regression exercises a pointer to a named timestamp and a named date string with a non-UTC default location. The time tests, full race suite, and Go vet passed.

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

Successfully merging this pull request may close these issues.

1 participant