for some situations, user.createdAt is UNIX timestamp number (... really??)
this accuracy is seems to milliseconds. related: #4808
This commit is contained in:
parent
747bf3bb85
commit
6ce986fcbf
@ -103,7 +103,7 @@ async function main() {
|
||||
async function migrateUser(user: any) {
|
||||
await Users.save({
|
||||
id: user._id.toHexString(),
|
||||
createdAt: user.createdAt || new Date(),
|
||||
createdAt: typeof user.createdAt === 'number' ? new Date(user.createdAt) : (user.createdAt || new Date()),
|
||||
username: user.username,
|
||||
usernameLower: user.username.toLowerCase(),
|
||||
host: toPuny(user.host),
|
||||
|
Loading…
Reference in New Issue
Block a user