Help us shape the future of Go! Take the 2026 Go Developer Survey

timeutil

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package timeutil provides timezone-aware time formatting utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDate added in v1.8.0

func FormatDate(t time.Time) string

FormatDate formats the given time as a YYYY-MM-DD date using the timezone from TZ environment variable.

func FormatDateTime added in v1.8.1

func FormatDateTime(t time.Time) string

FormatDateTime formats the given time as a YYYY-MM-DD HH:MM:SS datetime using the timezone from TZ environment variable.

func FormatRFC3339

func FormatRFC3339(t time.Time) string

FormatRFC3339 formats the given time in RFC3339 format using the timezone from TZ environment variable.

func ResetLocationCache

func ResetLocationCache()

ResetLocationCache resets the cached location. This is intended for testing purposes only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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