Skip to main content
elisabethf82215657
Inspiring
December 15, 2022
Question

jvm timezone vs server time and flex applications

  • December 15, 2022
  • 1 reply
  • 1209 views

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?

 

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    December 15, 2022

    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.

    elisabethf82215657
    Inspiring
    December 15, 2022

    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-three-char-daylight-saving

     

    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.

    BKBK
    Community Expert
    Community Expert
    December 16, 2022

    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.