Dev Guide: Timezone - usil/eventhos GitHub Wiki
Use these combinations to get the exact timezone you need in the web.
- In this example the desired Time zone is America/Lima (-05, -0500)
- A sample date within this timezone is 22/03/24 17:34
| db os TZ | db os date | db @@global.time_zone | db now() | api timezone | web result | comment |
|---|---|---|---|---|---|---|
| Europe/London | Fri Mar 22 22:34:03 GMT 2024 | SYSTEM | 2024-03-22 22:34:03 | +05:00 | 22/03/24 17:34 | If your database is outside your country and you cannot set the timezone |
| NULL | Fri Mar 22 22:34:03 UTC 2024 | SYSTEM | 2024-03-22 22:34:03 | +05:00 | 22/03/24 17:34 | The database is in utc like aws RDS by default |
| America/Lima | Fri Mar 22 17:34:03 -05 2024 | SYSTEM | 2024-03-22 17:34:03 | +00:00 | 22/03/24 17:34 | If your database is outside your country but you can set the timezone |
Notes:
- Take note to the + and -
- For some reason in this mysql2 nodejs driver , if you desire -5 you must set +5
- If the database date at query level is the same of your country target , set
DATA_BASE_TIMEZONE: "+00:00"
References: