well-goknown/vendor/github.com/nbd-wtf/go-nostr/timestamp.go

14 lines
186 B
Go

package nostr
import "time"
type Timestamp int64
func Now() Timestamp {
return Timestamp(time.Now().Unix())
}
func (t Timestamp) Time() time.Time {
return time.Unix(int64(t), 0)
}