xorm:created,updated,deleted does not support millisecond time suffix #2373

Open
opened 2023-12-08 09:36:26 +00:00 by yangxin520520 · 0 comments

type Tb struct {
CreatedAt int64 json:"createdAt" xorm:"created"
UpdatedAt int64 json:"updatedAt" xorm:"updated"
DeletedAt int64 json:"deletedAt" xorm:"deleted"
}

Source code:
image

Need to be changed to:
return t.UnixNano() / 1e6

type Tb struct { CreatedAt int64 `json:"createdAt" xorm:"created"` UpdatedAt int64 `json:"updatedAt" xorm:"updated"` DeletedAt int64 `json:"deletedAt" xorm:"deleted"` } Source code: ![image](/attachments/2fe33f5a-79ef-48dd-866e-c68326003fb4) Need to be changed to: return t.UnixNano() / 1e6
161 KiB
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#2373
No description provided.