3 Replies Latest reply on Apr 28, 2014 2:52 PM by vuvarov-Oracle

    Setting timezone in Database Cloud

    1312966

      I want to set the timezone in my APEX-application from GMT to CEST (= GMT+2). I tried: APEX_UTIL.SET_SESSION_TIME_ZONE and ALTER SESSION SET TIMEZONE.

       

      Unfortunately without any result. Any suggestions?

       

      Regards, Feike

        • 1. Re: Setting timezone in Database Cloud
          vuvarov-Oracle

          Hi Feike,

           

          "CEST" is not a time zone region name Oracle database recognizes. Instead, you should be using "CET" and Oracle database will automatically adjust the time if daylight saving time is in effect.


          That said, where in your APEX application do you call APEX_UTIL.SET_SESSION_TIME_ZONE and how do you know it has no result (for example, did you check the value returned by current_timestamp)?

           

          Also, you could examine APEX debug output from your page view, which will tell you what time zone is being set for the current user session (search for "Setting session time_zone").

           

          Vlad

          • 2. Re: Setting timezone in Database Cloud
            1312966

            I added:

             

            BEGIN

              APEX_UTIL.SET_SESSION_TIME_ZONE( P_TIME_ZONE => '+02:00');

            END;

             

            in the login-page (101) in the login-process.

            • 3. Re: Setting timezone in Database Cloud
              vuvarov-Oracle

              Did this solve the problem, or is this the code that has not been working in the first place?

               

              Does the login page (101) actually run? For example, if your application is using "Oracle Cloud Identity Management" authentication, the APEX login page would not be used. If you are using this Cloud authentication, you could place the APEX_UTIL.SET_SESSION_TIME_ZONE call in an "On New Instance (new session)" application process.

               

              Thanks,

              Vlad