time.Time.Unix (method)
53 uses
time (current package)
time.go#L1127: func (t Time) Unix() int64 {
archive/zip
reader.go#L385: modified = time.Unix(epoch.Unix()+secs, nsecs)
writer.go#L313: mt := uint32(fh.Modified.Unix())
cloud.google.com/go/storage
storage.go#L712: fmt.Fprintf(buf, "%d\n", opts.Expires.Unix())
storage.go#L727: q.Set("Expires", fmt.Sprintf("%d", opts.Expires.Unix()))
compress/gzip
gzip.go#L160: le.PutUint32(z.buf[4:8], uint32(z.ModTime.Unix()))
contrib.go.opencensus.io/exporter/stackdriver
stats.go#L460: Seconds: start.Unix(),
stats.go#L464: Seconds: end.Unix(),
stats.go#L474: Seconds: end.Unix(),
trace_proto.go#L174: Seconds: t.Unix(),
crypto/tls
handshake_server.go#L717: createdAt := uint64(c.config.time().Unix())
handshake_server_tls13.go#L743: createdAt: uint64(c.config.time().Unix()),
github.com/go-git/go-git/v5/plumbing/format/index
encoder.go#L128: if t.Unix() < 0 || t.UnixNano() < 0 {
encoder.go#L132: return uint32(t.Unix()), uint32(t.Nanosecond()), nil
index.go#L157: fmt.Fprintf(buf, " ctime: %d:%d\n", e.CreatedAt.Unix(), e.CreatedAt.Nanosecond())
index.go#L158: fmt.Fprintf(buf, " mtime: %d:%d\n", e.ModifiedAt.Unix(), e.ModifiedAt.Nanosecond())
github.com/go-git/go-git/v5/plumbing/object
object.go#L157: u := s.When.Unix()
github.com/go-git/go-git/v5/plumbing/protocol/packp
ulreq_encode.go#L120: if err := e.pe.Encodef("deepen-since %d\n", when.Unix()); err != nil {
github.com/go-redis/redis/v8
cluster.go#L217: atomic.StoreUint32(&n.failing, uint32(time.Now().Unix()))
cluster.go#L227: if time.Now().Unix()-int64(failing) < timeout {
commands.go#L468: cmd := NewBoolCmd(ctx, "expireat", key, tm.Unix())
github.com/go-redis/redis/v8/internal/pool
conn.go#L47: atomic.StoreInt64(&cn.usedAt, tm.Unix())
github.com/golang/protobuf/ptypes
timestamp.go#L61: Seconds: t.Unix(),
github.com/google/go-cmp/cmp
report_text.go#L18: var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0
github.com/google/go-cmp/cmp/internal/diff
diff.go#L122: var randInt = rand.New(rand.NewSource(time.Now().Unix())).Intn(2)
github.com/jackc/pgtype
date.go#L183: tUnix := time.Date(src.Time.Year(), src.Time.Month(), src.Time.Day(), 0, 0, 0, 0, time.UTC).Unix()
date.go#L184: dateEpoch := time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC).Unix()
timestamp.go#L195: microsecSinceUnixEpoch := src.Time.Unix()*1000000 + int64(src.Time.Nanosecond())/1000
timestamptz.go#L192: microsecSinceUnixEpoch := src.Time.Unix()*1000000 + int64(src.Time.Nanosecond())/1000
github.com/prometheus/client_golang/prometheus
metric.go#L156: pb.TimestampMs = proto.Int64(m.t.Unix()*1000 + int64(m.t.Nanosecond()/1000000))
golang.org/x/crypto/openpgp
write.go#L137: epochSeconds = uint32(hints.ModTime.Unix())
write.go#L242: epochSeconds = uint32(hints.ModTime.Unix())
golang.org/x/crypto/openpgp/packet
public_key.go#L467: t := uint32(pk.CreationTime.Unix())
public_key.go#L559: binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))
public_key_v3.go#L161: t := uint32(pk.CreationTime.Unix())
public_key_v3.go#L197: binary.BigEndian.PutUint32(suffix[1:], uint32(sig.CreationTime.Unix()))
signature.go#L672: binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
signature_v3.go#L110: binary.BigEndian.PutUint32(buf[1:5], uint32(sig.CreationTime.Unix()))
golang.org/x/crypto/ssh
certs.go#L403: unixNow := clock().Unix()
golang.org/x/oauth2/google
jwt.go#L61: Iat: iat.Unix(),
jwt.go#L62: Exp: exp.Unix(),
golang.org/x/oauth2/jws
jws.go#L60: c.Iat = now.Unix()
jws.go#L63: c.Exp = now.Add(time.Hour).Unix()
golang.org/x/oauth2/jwt
jwt.go#L120: claimSet.Exp = time.Now().Add(t).Unix()
golang.org/x/sys/unix
timestruct.go#L32: sec := t.Unix()
google.golang.org/api/idtoken
validate.go#L137: if now().Unix() > payload.Expires {
google.golang.org/grpc/balancer/grpclb
grpclb_remote_balancer.go#L308: Seconds: t.Unix(),
google.golang.org/protobuf/encoding/protojson
well_known_types.go#L819: secs := t.Unix()
google.golang.org/protobuf/types/known/timestamppb
timestamp.pb.go#L193: return &Timestamp{Seconds: int64(t.Unix()), Nanos: int32(t.Nanosecond())}
net/http
fs.go#L516: if t.Unix() == modtime.Unix() {
server.go#L1764: packedState := uint64(time.Now().Unix()<<8) | uint64(state)
server.go#L2796: if st == StateNew && unixSec < time.Now().Unix()-5 {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |