github.com/zooyer/miskit@v1.0.71/utils/time.go (about)

     1  /**
     2   * @Author: zzy
     3   * @Email: zhangzhongyuan@didiglobal.com
     4   * @Description:
     5   * @File: time.go
     6   * @Package: utils
     7   * @Version: 1.0.0
     8   * @Date: 2022/6/13 15:59
     9   */
    10  
    11  package utils
    12  
    13  import "time"
    14  
    15  // TimestampFormat 序列化时间戳
    16  func TimestampFormat(seconds int64, format string) string {
    17  	return time.Unix(seconds, 0).Format(format)
    18  }