10 examples of 'golang time.time' in Go

Every line of 'golang time.time' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
1152func (s *Delete_commandContext) Time() ITimeContext {
1153 var t = s.GetTypedRuleContext(reflect.TypeOf((*ITimeContext)(nil)).Elem(), 0)
1154
1155 if t == nil {
1156 return nil
1157 }
1158
1159 return t.(ITimeContext)
1160}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

138func (t TimeSinceEpoch) Time() time.Time {
139 return time.Time(t)
140}
672func (t MonotonicTime) Time() time.Time {
673 return time.Time(t)
674}
49func (t DiscordTimestamp) Time() time.Time {
50 return time.Time(t)
51}
774func (u UnixTime) Time() time.Time {
775 return FromUnixTime(u)
776}
176func goTime(t C.pn_timestamp_t) time.Time {
177 if t == 0 {
178 return time.Time{}
179 }
180 return time.Unix(0, int64(t)*int64(time.Millisecond))
181}
134func (d *dateObject) time() time.Time {
135 return timeFromMsec(d.msec)
136}
74func (rid ReplicationLastID) Time() time.Time {
75 return time.Unix(0, rid.int64*1000000)
76}
60func (c *ChatMemberUpdated) Time() time.Time {
61 return time.Unix(c.Unixtime, 0)
62}
9func (tst *Timestamp) Time() time.Time {
10 return time.Unix(tst.Seconds, int64(tst.Nanos))
11}

Related snippets