Get Hour Offset within Day
Examples in
Go
Hour returns the hour within the day specified by t, in the range [0, 23].
package main
import (
"fmt"
"time"
)
func main() {
now := time.Now()
fmt.Println(now.Hour())
}