feat: change column type to datetime

This commit is contained in:
Zamitto 2024-05-22 16:01:09 -03:00
parent 016f47d17f
commit f252abc7a7
2 changed files with 2 additions and 5 deletions

View File

@ -59,7 +59,7 @@ export class Game {
@Column("int", { default: 0 })
bytesDownloaded: number;
@Column("text", { nullable: true })
@Column("datetime", { nullable: true })
lastTimePlayed: Date | null;
@Column("float", { default: 0 })

View File

@ -56,10 +56,7 @@ export const startProcessWatcher = async () => {
await gameRepository.update(game.id, {
playTimeInMilliseconds: game.playTimeInMilliseconds + delta,
});
gameRepository.update(game.id, {
lastTimePlayed: new Date().toUTCString(),
lastTimePlayed: new Date(),
});
}