Files
ALPHA-TRAIN2/services/tiktak/vendor/github.com/gocraft/dbr/v2/now.go
T
bobiqq c231be0094
build-and-push / detect (push) Successful in 7s
build-and-push / build (${{ fromJSON(needs.detect.outputs.services) }}) (push) Failing after 3m33s
services
2026-08-26 11:04:23 +03:00

20 lines
382 B
Go

package dbr
import (
"database/sql/driver"
"time"
)
// Now is a value that serializes to the current time in UTC.
var Now = nowSentinel{}
const timeFormat = "2006-01-02 15:04:05.000000"
type nowSentinel struct{}
// Value implements a valuer for compatibility
func (n nowSentinel) Value() (driver.Value, error) {
now := time.Now().UTC().Format(timeFormat)
return now, nil
}