SET time_zone = '+7:00';
This commit is contained in:
parent
ee1e72031f
commit
6f87392eaf
1 changed files with 2 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ export class MyCustomLogger implements Logger {
|
||||||
export const AppDataSource = new DataSource({
|
export const AppDataSource = new DataSource({
|
||||||
type: "mysql",
|
type: "mysql",
|
||||||
// extra: {
|
// extra: {
|
||||||
// timezone: "Asia/Bangkok", // Set to Bangkok timezone
|
// timezone: "+07:00", // Bangkok timezone (UTC+7)
|
||||||
// },
|
// },
|
||||||
database: process.env.DB_NAME,
|
database: process.env.DB_NAME,
|
||||||
host: process.env.DB_HOST,
|
host: process.env.DB_HOST,
|
||||||
|
|
@ -45,6 +45,7 @@ export const AppDataSource = new DataSource({
|
||||||
connectorPackage: "mysql2",
|
connectorPackage: "mysql2",
|
||||||
synchronize: false,
|
synchronize: false,
|
||||||
logging: true,
|
logging: true,
|
||||||
|
timezone: "Z",
|
||||||
entities:
|
entities:
|
||||||
process.env.NODE_ENV !== "production"
|
process.env.NODE_ENV !== "production"
|
||||||
? ["src/entities/**/*.ts"]
|
? ["src/entities/**/*.ts"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue