I've got a weird issue w/our servers. Our producti...
# cfml-general
d
I've got a weird issue w/our servers. Our production servers have all the sudden started returning time zone information in our timestamps as "GMT-04:00" and "GMT-05:00" instead of EST/EDT. Our QA & Staging and Development servers are not showing the behavior and they all are configured with the same provisioning scripts. The servers are all configured to the English US locale, so I'm not sure why the code is behaving differently. In theory, the QA/Staging and Production should be identical. Any ideas on why the Java date libraries would be returning different results?
j
They should always be returning GMT. The code should change it to local time, but the DB should be in GMT. Also, this should be required watching for every developer.

https://www.youtube.com/watch?v=-5wpm-gesOY

d
We store everything in GMT, this is when converting the timestamp for the user's locale. This is all stuff that has been working for years correctly.
j
This is all stuff that has been working for years correctly.
Oh.. Well.. What changed?
d
Good question. Not the code. I think it's something in the OS, but not sure. Our OS is managed and it's the one thing that can change. However, all regional/locale settings in Lucee and the JVM are identical. One thing I am seeing is that the locale on the production servers are coming back as "en_GB.UTF-8" , while the working servers are "en_US.UTF-8". However, I'm not sure if this has changed recently.
j
That change is likely the issue since GB is not the same as US. I would hop on a call with the management of your OS and get them to change that to US and see if that helps. Cut the problem in half and test that way. If all your local files are the same and nothing has changed there from before the break to now, then once you eliminate the impossible, whatever remains, however improbable, must be the truth.
and that time setting sounds like it could be effecting this.
Hopefully you aren't with HostTek. 🙂
d
While I still need to verify with our hosting company if they changed the locale on the servers, I don't think that happened. We rolled out Tomcat 9.0.102 recently and that seems to have changed the behavior with Lucee 5.4.x. While we have our regional settings set, it seems like Tomcat was taking the OS's locale settings. To resolve the issue, I've updated our JVM settings with
-Duser.country=US -Duser.language=en
to help enforce that Tomcat will always see the expected locale. That way the OS settings are irrelevant.
👍 1
n
Also, Britain has BST which can confuse matters. I set everything to UTC, and don't rely on GMT