Correct usage of tzset(), TZ env

https://knowledgebase.progress.com/articles/Article/000044163
TZ variable can be set on on for a session, user profile or use it in the Database start-up script to start the database for the specific timezone or country or city.

Following are some examples can be tested in a terminal session of UNIX.

For China is UTC+8:00 or GMT+8:00

TZ needs to set it with opposite sign as follows:

TZ=UTC-8:00; export TZ
or,
TZ=GMT-8:00; export TZ
or,
TZ=Asia/Shanghai;export TZ

setenv("TZ", "GMT-8:00", 1) tzset(); 

For US EST (GMT-5:00, New York):

TZ=UTC+5:00; export TZ
Or,
TZ=GMT+5:00; export TZ
Or,
TZ=America/New_York;export TZ

setenv("TZ", "UTC+5:00", 1) tzset(); 

No comments:

Post a Comment

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...