mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
ent/field: add update_default option time field
Reviewed By: alexsn Differential Revision: D17070907 fbshipit-source-id: 63c9ce75c58e524044c38f9461cb04e8e45c8017
This commit is contained in:
committed by
Facebook Github Bot
parent
bd07c86b60
commit
772b8a33f8
@@ -103,7 +103,7 @@ func (b Bindings) Add(v interface{}) string {
|
||||
k := fmt.Sprintf("$%x", len(b))
|
||||
switch v := v.(type) {
|
||||
case time.Time:
|
||||
b[k] = v.Unix()
|
||||
b[k] = v.UnixNano()
|
||||
default:
|
||||
b[k] = v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user