Standard library / time
time.Time.UnixMilli()
Return milliseconds since Unix epoch; undefined if the result cannot fit int64. Expected stdout: '1500\n'.
Formal Syntax & Structure
go syntaxgo
func (t Time) UnixMilli() int64Return Value
int64
Return milliseconds since Unix epoch; undefined if the result cannot fit int64.
Working Example
Example Snippetgo
package main
import ( "fmt" "time")
func main() { fmt.Println(time.Unix(1, 500000000).UnixMilli()) }