-
-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Require 2-digit hour for local time #320
Comments
This is actually an issue for all datetimes, not just local time; the problem is that |
I'm somewhat leaning towards just leaving it like this; writing times like "1:12:13" isn't too uncommon, it will always encode things as "01:12:13" so it won't cause issues with other decoders, and even though it's not fully spec-compliant I don't really see any problems with it. Might be worth discussing modifying the specification on this. |
I'm simply reporting issues I've found while doing differential fuzzing against this package and But I'm in favor of following the TOML spec. As reported, this issue doesn't follow the spec. |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) | require | minor | `v1.3.2` -> `v1.4.0` | --- ### Release Notes <details> <summary>BurntSushi/toml (github.com/BurntSushi/toml)</summary> ### [`v1.4.0`](https://github.com/BurntSushi/toml/releases/tag/v1.4.0) [Compare Source](BurntSushi/toml@v1.3.2...v1.4.0) This version requires Go 1.18 - Add toml.Marshal() ([#​405](BurntSushi/toml#405)) - Require 2-digit hour ([#​320](BurntSushi/toml#320)) - Wrap UnmarshalTOML() and UnmarshalText() return values in ParseError for position information ([#​398](BurntSushi/toml#398)) - Fix inline tables with dotted keys inside inline arrays (e.g. `k=[{a.b=1}]`) ([#​400](BurntSushi/toml#400)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzQuMyIsInVwZGF0ZWRJblZlciI6IjM3LjM3NC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.internal/nrdufour/marmitton/pulls/31 Co-authored-by: Renovate <renovate@ptinem.casa> Co-committed-by: Renovate <renovate@ptinem.casa>
Given
a=1:32:00
, this package returns a valid time-local value instead of returning an error.Reproduction
https://play.golang.org/p/fciY3UVyoT6
Or using the
toml-test
decoder:The text was updated successfully, but these errors were encountered: