feat(app): update
This commit is contained in:
@ -3,8 +3,9 @@ package utils
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/anxpp/common-utils/str"
|
||||
"time"
|
||||
|
||||
"github.com/anxpp/common-utils/str"
|
||||
)
|
||||
|
||||
type Time struct {
|
||||
@ -19,7 +20,7 @@ func (t *Time) UnmarshalJSON(data []byte) (e error) {
|
||||
func (t Time) MarshalJSON() ([]byte, error) {
|
||||
return ([]byte)(fmt.Sprintf("\"%s\"", t.Time.Format(str.TimeLayout))), nil
|
||||
}
|
||||
func (t *Time) Scan(value interface{}) error {
|
||||
func (t *Time) Scan(value any) error {
|
||||
bytes, _ := value.([]byte)
|
||||
tt, _ := time.ParseInLocation(str.TimeLayout, string(bytes), time.Local)
|
||||
*t = Time{
|
||||
|
||||
Reference in New Issue
Block a user