File: time.go

package info (click to toggle)
golang-github-jinzhu-now 1.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 132 kB
  • sloc: makefile: 2
file content (9 lines) | stat: -rw-r--r-- 201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
package now

import "time"

func formatTimeToList(t time.Time) []int {
	hour, min, sec := t.Clock()
	year, month, day := t.Date()
	return []int{t.Nanosecond(), sec, min, hour, day, int(month), year}
}