mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
fix: correctly set new date (#19766)
This commit is contained in:
parent
d87468f098
commit
d9f9c0cd21
@ -68,11 +68,8 @@ const enableDraftAndPublish = async ({ oldContentTypes, contentTypes }: Input) =
|
||||
return qb.raw('NULL as published_at');
|
||||
}
|
||||
|
||||
// TODO: Find a way to insert a date using the correct format
|
||||
// Before: 1710240975246
|
||||
// With qb.fn.now(): 2021-10-24 09:52:46
|
||||
if (att === 'updated_at') {
|
||||
return qb.raw(`?? as updated_at`, [qb.fn.now()]);
|
||||
return qb.raw(`? as updated_at`, [new Date()]);
|
||||
}
|
||||
|
||||
return att;
|
||||
|
Loading…
x
Reference in New Issue
Block a user