Skip to content

Commit

Permalink
Merge pull request #87 from auth0-lab/default_pgtz
Browse files Browse the repository at this point in the history
fix: default PGTZ to UTC
  • Loading branch information
jcenturion authored Oct 15, 2024
2 parents 348ea7d + 4ec3990 commit d684f76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PGUSER=postgres
PGPASSWORD=postgres
PGDATABASE=market0
PGPORT=5442
PGTZ=UTC

### ---------------- ###
### Production like ###
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDATABASE}
- TZ=${PGTZ}
- PGTZ=${PGTZ}
- TZ=${PGTZ:-UTC}
- PGTZ=${PGTZ:-UTC}}
volumes:
- ./database/create.sql:/docker-entrypoint-initdb.d/01-create.sql
- pgdata:/var/lib/postgresql/data
Expand Down
2 changes: 1 addition & 1 deletion lib/db/sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export const sql: ReturnType<typeof postgres> = process.env.USE_NEON
>)
: postgres({
connection: {
TimeZone: process.env.PGTZ
TimeZone: process.env.PGTZ ?? "UTC",
}
});

0 comments on commit d684f76

Please sign in to comment.