internal

package
v0.0.0-...-0941746 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LocalDatetime = time.FixedZone("datetime-local", localOffset)
	LocalDate     = time.FixedZone("date-local", localOffset)
	LocalTime     = time.FixedZone("time-local", localOffset)
)

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.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL