1 Star 0 Fork 0

csingo/cHelper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Time.go 418 Bytes
一键复制 编辑 原始数据 按行查看 历史
cxy1620541673 提交于 2025-06-17 18:02 +08:00 . update
package cHelper
import (
"time"
)
func MillisToTime(ms int64) time.Time {
return time.Unix(ms/1000, (ms%1000)*int64(time.Millisecond)).Local()
}
func MillisToFormat(ms int64, layout string) string {
return MillisToTime(ms).Format(layout)
}
func SecondsToTime(s int64) time.Time {
return time.Unix(s, 0).Local()
}
func SecondsToFormat(s int64, layout string) string {
return SecondsToTime(s).Format(layout)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/csingo/cHelper.git
git@gitee.com:csingo/cHelper.git
csingo
cHelper
cHelper
v0.4.32

搜索帮助