Documentation
¶
Overview ¶
Package time extends the time package in the stdlib.
Index ¶
Examples ¶
Constants ¶
View Source
const (
MySQLDateTime = "2006-01-02 15:04:05"
)
Time format extensions for the ones in the standard library.
Variables ¶
View Source
var SystemClock = ClockFunc(time.Now)
SystemClock returns the current system time.
Functions ¶
This section is empty.
Types ¶
type StoppedAt ¶ added in v0.3.0
StoppedAt shows the moment it has been stopped at.
Example ¶
package main
import (
"fmt"
stdtime "time"
"github.com/goph/stdlib/time"
)
func main() {
t := stdtime.Date(2017, stdtime.May, 10, 22, 52, 0, 0, stdtime.UTC)
clock := time.StoppedAt(t)
fmt.Println(clock.Now())
}
Output: 2017-05-10 22:52:00 +0000 UTC
Click to show internal directories.
Click to hide internal directories.