Skip to content

Commit

Permalink
Merge pull request #96 from bzy39/improvment/add-tz-env
Browse files Browse the repository at this point in the history
improvement: add db timezone to env
  • Loading branch information
allgood authored Jun 28, 2024
2 parents ce71cb8 + d0a0e30 commit 9a7a8e4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env-backend-acme
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DB_HOST=postgres
DB_PORT=5432
DB_USER=ticketz
DB_NAME=ticketz
DB_TIMEZONE=-03:00


REDIS_URI=redis://redis:6379
Expand Down
2 changes: 1 addition & 1 deletion .env-backend-cloudflare
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DB_HOST=postgres
DB_PORT=5432
DB_USER=ticketz
DB_NAME=ticketz

DB_TIMEZONE=-03:00

REDIS_URI=redis://redis:6379
REDIS_OPT_LIMITER_MAX=1
Expand Down
1 change: 1 addition & 0 deletions .env-backend-local
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ DB_HOST=postgres
DB_PORT=5432
DB_USER=ticketz
DB_NAME=ticketz
DB_TIMEZONE=-03:00


REDIS_URI=redis://redis:6379
Expand Down
2 changes: 1 addition & 1 deletion backend/src/config/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
collate: "utf8mb4_bin"
},
dialect: process.env.DB_DIALECT || "mysql",
timezone: "-03:00",
timezone: process.env.DB_TIMEZONE || "-03:00",
host: process.env.DB_HOST,
port: process.env.DB_PORT || 3306,
database: process.env.DB_NAME,
Expand Down

0 comments on commit 9a7a8e4

Please sign in to comment.