Skip to content

Commit

Permalink
util加入time的import
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaoxincheng02 committed Jun 22, 2022
1 parent 59c8bb7 commit 7ac83da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/converts/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package converts

import (
"reflect"
"time"

nebula_type "github.com/vesoft-inc/nebula-go/v2/nebula"
"github.com/zhihu/norm/constants"
Expand Down Expand Up @@ -32,7 +33,7 @@ func setFieldValue(tag string, field reflect.Value, nValue *nebula_type.Value) e
case reflect.String:
field.SetString(string(nValue.GetSVal()))
case reflect.Struct:
switch field.Type().String() {
switch field.Type().String() {
case "time.Time":
ts := nValue.GetIVal()
field.Set(reflect.ValueOf(time.Unix(ts, 0)))
Expand Down

0 comments on commit 7ac83da

Please sign in to comment.