diff options
| author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2021-08-05 15:45:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-05 15:45:55 +0000 |
| commit | 1359f07bda73036f80d6938bcf92584c7ee10d1f (patch) | |
| tree | 0d0b9b3cd16b360e0866b7ec5949bc9bbadf7321 /vendor/github.com/BurntSushi/toml/internal | |
| parent | 1f0a24437d71f8fe2b2233a428202afcfe513666 (diff) | |
| parent | adee0ca59972a8590f5f278a4fbcc531acec2ebb (diff) | |
| download | podman-1359f07bda73036f80d6938bcf92584c7ee10d1f.tar.gz podman-1359f07bda73036f80d6938bcf92584c7ee10d1f.tar.bz2 podman-1359f07bda73036f80d6938bcf92584c7ee10d1f.zip | |
Merge pull request #11144 from containers/dependabot/go_modules/github.com/BurntSushi/toml-0.4.1
Bump github.com/BurntSushi/toml from 0.3.1 to 0.4.1
Diffstat (limited to 'vendor/github.com/BurntSushi/toml/internal')
| -rw-r--r-- | vendor/github.com/BurntSushi/toml/internal/tz.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/vendor/github.com/BurntSushi/toml/internal/tz.go b/vendor/github.com/BurntSushi/toml/internal/tz.go new file mode 100644 index 000000000..022f15bc2 --- /dev/null +++ b/vendor/github.com/BurntSushi/toml/internal/tz.go @@ -0,0 +1,36 @@ +package internal + +import "time" + +// Timezones used for local datetime, date, and time TOML types. +// +// The exact way times and dates without a timezone should be interpreted is not +// well-defined in the TOML specification and left to the implementation. These +// defaults to current local timezone offset of the computer, but this can be +// changed by changing these variables before decoding. +// +// TODO: +// Ideally we'd like to offer people the ability to configure the used timezone +// by setting Decoder.Timezone and Encoder.Timezone; however, this is a bit +// tricky: the reason we use three different variables for this is to support +// round-tripping – without these specific TZ names we wouldn't know which +// format to use. +// +// There isn't a good way to encode this right now though, and passing this sort +// of information also ties in to various related issues such as string format +// encoding, encoding of comments, etc. +// +// So, for the time being, just put this in internal until we can write a good +// comprehensive API for doing all of this. +// +// The reason they're exported is because they're referred from in e.g. +// internal/tag. +// +// Note that this behaviour is valid according to the TOML spec as the exact +// behaviour is left up to implementations. +var ( + localOffset = func() int { _, o := time.Now().Zone(); return o }() + LocalDatetime = time.FixedZone("datetime-local", localOffset) + LocalDate = time.FixedZone("date-local", localOffset) + LocalTime = time.FixedZone("time-local", localOffset) +) |
