A common requirement in programs is getting the number of seconds, milliseconds, or nanoseconds since the Unix epoch. Here’s how to do it in Go. |
|
|
|
|
|
|
|
Use |
|
|
|
You can also convert integer seconds or nanoseconds
since the epoch into the corresponding |
|
|
|
Next we’ll look at another time-related task: time parsing and formatting. |
Next example: Time Formatting / Parsing.