Skip to content

Glossary: Go Basics

time package

Also written: time.Now, time.Date, Format, AddDate, time.UTC

The standard-library package for dates and times. `Format` takes a layout written with Go's reference date (Monday, January 2, 2006 at 15:04), and `UTC` is world time.

Where the book teaches it