diff --git a/rfctime/rfc3339.go b/rfctime/rfc3339.go index 73934f0..21d95a3 100644 --- a/rfctime/rfc3339.go +++ b/rfctime/rfc3339.go @@ -4,13 +4,14 @@ import ( "encoding/json" "errors" "fmt" + "reflect" + "time" + "git.blackforestbytes.com/BlackForestBytes/goext/langext" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/bsoncodec" "go.mongodb.org/mongo-driver/bson/bsonrw" "go.mongodb.org/mongo-driver/bson/bsontype" - "reflect" - "time" ) type RFC3339Time time.Time @@ -263,3 +264,7 @@ func NewRFC3339Ptr(t *time.Time) *RFC3339Time { func NowRFC3339() RFC3339Time { return RFC3339Time(time.Now()) } + +func (t RFC3339Time) ToNano() RFC3339NanoTime { + return NewRFC3339Nano(t.Time()) +}