| 1234567891011121314151617181920212223 |
- package main
- import (
- "fmt"
- "time"
- "git.wecise.com/wecise/odbserver/odb/util"
- )
- func EncodeNanoTime(ctime int64) float64 {
- ms := int64(ctime / 1e6)
- return float64(ms) + float64(ctime-ms*1e6)/1e6
- }
- func main() {
- ctime := time.Now().UnixNano()
- //fmt.Printf( "==> %d \n", int( (msseconds+util.G_TIME_ZONE*1000)/(86400000) ) )
- fmt.Printf("==> %d \n", ((ctime+util.G_TIME_ZONE*1e9)/3600/1e9)%24)
- fmt.Printf("%v, %f", uint64(ctime), EncodeNanoTime(ctime))
- }
|