Once Upon a Time

The recipes in this chapter are:

  • Finding today's date
  • Formatting date to string
  • Parsing the string into date
  • Converting dates to epoch and vice versa
  • Retrieving time units from the date
  • Date arithmetics
  • Finding the difference between two dates
  • Converting between time zones
  • Running the code block periodically
  • Waiting a certain amount of time
  • Timeout long-running operations
  • Serializing the time and date

Get Go Standard Library Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.