rfc3339time

package
v0.1.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time struct{ time.Time }

Time wraps time.Time to handle RFC3339 serialization for SQLite TEXT columns

func Now

func Now() Time

Now returns the current time as rfc3339time.Time

func Parse

func Parse(layout, value string) (Time, error)

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Time) Scan

func (t *Time) Scan(src any) error

Scan implements sql.Scanner for database retrieval

func (Time) String

func (t Time) String() string

String returns the time formatted as RFC3339

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value implements driver.Valuer for database storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL