Documentation ¶
Overview ¶
Description: Time related helper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NowWithPrecision ¶
NewWithPrecision returns a new now time.Time (UTC) with the given precision.
func SwapTimezone ¶ added in v1.18.0
SwapTimezone takes a date (which can be in any timezone) and returns the date in the specified timezone.
The original timezone is overridden by the new timezone.
This method does not perform any timezone conversion. It simply changes the timezone of the date.
If toUTC is true, the returned date is converted to UTC.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.