Highlighted

How to set server time zone value

Contributor ,
Aug 05, 2020

Copy link to clipboard

Copied

I came back to a previously working local server that accesses a remote datasource. I have no clue what changed in the interim, but when I try to run my local scripts that contain calls to the datasource, or when I try to create a new CF datasource to access the server db, I get this  error text. I don't know where to go to change time zone values.  I did see a page on stackoverflow that described how to access the CF server's JVM arguments to insert "-Duser.timezone=" and then your timezone ID. This did not work.

Thanks!

 

John_Allred_0-1596656473142.png

I should note that the template that makes calls to this db on the live server works just fine.

Views

38

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to set server time zone value

Contributor ,
Aug 05, 2020

Copy link to clipboard

Copied

I came back to a previously working local server that accesses a remote datasource. I have no clue what changed in the interim, but when I try to run my local scripts that contain calls to the datasource, or when I try to create a new CF datasource to access the server db, I get this  error text. I don't know where to go to change time zone values.  I did see a page on stackoverflow that described how to access the CF server's JVM arguments to insert "-Duser.timezone=" and then your timezone ID. This did not work.

Thanks!

 

John_Allred_0-1596656473142.png

I should note that the template that makes calls to this db on the live server works just fine.

Views

39

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 05, 2020 0
Participant ,
Aug 05, 2020

Copy link to clipboard

Copied

CDT is not a valid timezone, its just a name for an American zone when in DST. Timezones are usually defined as something like America/Chicago, which gives you CST and follows DST. If you don't need to follow DST then use Etc/GMT+6 for CST. There is a database of Timezones with details in places like https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 05, 2020 0
BKBK LATEST
Adobe Community Professional ,
Aug 06, 2020

Copy link to clipboard

Copied

I wouldn't set the time-zone as a global JVM property. If you did, it would be taken up by software components that didn't need the time-zone.

 

You should set the time-zone as a property of the specific datasource. To do so, proceed as follows:

1) Open the ColdFusion Administrator and go to the Data Sources page.

2) Click on the button to edit the datasource in question (OleSouth), then on the button Show Advanced Settings.

3) Enter your time-zone in the Connection String field as:

 

serverTimezone=time_zone_of_your_database_server

 

Obtain the value time_zone_of_your_database_server from the column "TZ database name" in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

 

Mine, for example, is Europe/Amsterdam. Hence:

timezone.png

 4) Press the button to Submit the change.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2020 0