Copy link to clipboard
Copied
My team develops and maintains a Coldfusion application (using CF 2018 Update 15) including multiple occasionally connected clients using the flex gateway for data exchange.
Currently our application is being migrated to new server infrastructure and on the new servers we need help with a problem.
On the old servers we had the following JVM timezone configuration: -Duser.timezone=NewYork
This had to be added because without this timezone parameter some objects could not be synchronized between the flex clients and the server.
All of our servers are in timezone CET, but on the old servers everything worked well. The time used in the Coldfusion application was server time (CET).
On the new servers with the same JVM configuration the server time again is CET, but Coldfusion now internally uses timezone NewYork. When we configure CET in the JVM everything is ok in the Web application, but again the Flex clients fail to synchronize.
The only difference I can see between the two installations is the used Java version:
On the old servers we use Java 11.0.15.1, on the new ones 11.0.16.
Can the different behaivour come from the difference in the Java version? Or is there a hidden configuration somewhere to make Coldfusion ignore the JVM timezone?
Copy link to clipboard
Copied
Before we look further, let's get one thing out of the way first.
Replace
-Duser.timezone=NewYork
with
-Duser.timezone=America/New_York
Then restart ColdFusion. See if that helps.
Copy link to clipboard
Copied
Thank you for your response!
I know that NewYork is not a legal timzone string. This is where we got the workaround from in the first case:
https://stackoverflow.com/questions/54674629/coldfusion-2018-and-blazeds-datetime-parse-error-for-th...
I changed the JVM timezone to Americy/New_York and again had the problem of the wrong server timezone:
We need to have CET time and zone.
Copy link to clipboard
Copied
OK.
Then change the JVM setting to
-Duser.timezone=CET
The server and Java will then share the same timezone, which is what you want.
Restart ColdFusion.
Now, there's just one problem to discuss: objects not being synchronized between the flex clients and the server. Give us details about the problem.
Copy link to clipboard
Copied
This is exactly what we do at the moment. We work on the synchronization problem and use the timezone CET on the new, not yet productive, server.
But my question here is: Why do I have 2 coldfusion servers with the same CF version and the same JVM timezone setting (NewYork) and on one of the servers the function now() supplies server time, on the other server it supplies NewYork local time? Is there some configuration setting we have missed?
Copy link to clipboard
Copied
But my question here is: Why do I have 2 coldfusion servers with the same CF version and the same JVM timezone setting (NewYork) and on one of the servers the function now() supplies server time, on the other server it supplies NewYork local time? Is there some configuration setting we have missed?
By @elisabethf82215657
I think I have already answered the question. 🙂
Perhaps not clearly. So here is my answer once again.
The setting
-Duser.timezone=NewYork
is probably incorrect. If you use it, ColdFusion will ignore it and use the server's timezone instead.
If you use the correct setting, namely,
-Duser.timezone=America/New_York
then the value of ColdFusion's now() will be the current time in New York.
That is the behaviour I would expect in any case. As far as I can see there was no change in Java timezone behaviour between Java 11.0.15 and Java 11.0.16.
Copy link to clipboard
Copied
Any joy yet? 🙂
Copy link to clipboard
Copied
Sorry, not really :-)!
The synch-problem seems to be restricted to objects containing timestamps with different timezones (which can happen during clock change for daylight-saving time).
At the moment we implement a workaround which will synchronize timestamps in text format and not as time-objects (including timezone handling, of course).
But what I still do not understand is why the original workaround (which I never liked because I want to know why a workaround works) which uses the incorrect timezone NewYork in the Java virtual machine works on the old servers, but does not work on the new servers with the same configuration.
In future we are going to use timezone CET (which is the correct timezone for our servers) and hope that the correction of the timestamp-synch will bring everything back to normal.
Thanks for trying to help 🙂
Copy link to clipboard
Copied
Elisabeth, since you want to understand the different behavior on the two machines, please elaborate on how they differ. You've mentioned so far that "The only difference I can see between the two installations is the used Java version: On the old servers we use Java 11.0.15.1, on the new ones 11.0.16."
So first, do you mean they are identical as to their operating system, its version, and its update level, as well as the CF version and its update level?
If you still feel that the only difference TRULY is about that jvm version difference (and assuming you are confirming this info is in the CF Admin "settings summary" or "system information" page), then are you in a position to try changing one or the other to use the other's JVM version--to confirm if somehow that IS (or is NOT) the cause of this behavior difference? I realize you may feel you "can't change it", but if this is truly the "only" difference, then it would seem you need to get permission to test that hypothesis, even if only momentarily and in off-hours.
If somehow you confirm that syncing the jvm versions does NOT cause the two servers to behave the same, then there clearly must be SOME other difference. (And if you CANNOT test that jvm change, we can also consider other possibilities.) I've posed possible OS or CF update version differences.
Another thing to compare would be the jvm.config file for each instance on the two machines. There may be some difference there you're not considering.
Finally, you may be wondering if there is a CF Admin configuration difference (other than Java settings) you're not noticing that could be related. I'd not think so, but here's a tip: you can go to the CF Admin "settings summary" page, click on the text (it's a frame), do a "select all" of the text, and copy it to the clipboard.
Do that for each, and compare that settings page in a good compare tool (I favor beyondcompare, which offers a wonderful free trial--30 days of USE, not 30 days from installation, so you could use it for 30 months once a month!). It can EASILY compare such CF admin settings summary page contents to help spot in minutes (if not seconds) what any differences may be. (It can even do that across different CF versions.)