SET time_zone = '+7:00';

This commit is contained in:
kittapath 2025-03-10 15:14:29 +07:00
parent ee1e72031f
commit 6f87392eaf

View file

@ -35,7 +35,7 @@ export class MyCustomLogger implements Logger {
export const AppDataSource = new DataSource({
type: "mysql",
// extra: {
// timezone: "Asia/Bangkok", // Set to Bangkok timezone
// timezone: "+07:00", // Bangkok timezone (UTC+7)
// },
database: process.env.DB_NAME,
host: process.env.DB_HOST,
@ -45,6 +45,7 @@ export const AppDataSource = new DataSource({
connectorPackage: "mysql2",
synchronize: false,
logging: true,
timezone: "Z",
entities:
process.env.NODE_ENV !== "production"
? ["src/entities/**/*.ts"]