package util
import “time”
/*
获取时间戳(纳秒)
Testner 20210123
/
func GetTime_UnixNano() string{
currentTime := time.Now()
// fmt.Println(“时间戳(纳秒):”, now.UnixNano()/1e6)
return currentTime.Format(“2006-01-02 15:04:05.000000”)
//fmt.Println(“Time with MicroSeconds: “, currentTime.Format(“2006-01-02 15:04:05.000000”))
//fmt.Println(“Time with NanoSeconds: “, currentTime.Format(“2006-01-02 15:04:05.000000000”))
//Time with MicroSeconds: 2020-06-01 10:10:46.155173
//Time with NanoSeconds: 2020-06-01 10:10:46.155173100
}
Original: https://www.cnblogs.com/sea520/p/14329506.html
Author: sea的博客
Title: GO语言常用时间工具类 timeUtil.go
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/535744/
转载文章受原作者版权保护。转载请注明原作者出处!