I'm searching for an Solution to override the time settings from the Server. We interact with other systems, where the time is managed by an central component, which changes the time for testing reasons. I don't want to change the Server Time in this case. I want to override the component within Pega, which gets the time from the Server Setting and deliver the time to the Application for Calculation for example of the SLA's, Case Updates etc.
***Edited by moderator, Maryrita: moved to Product Support from Applications***
***Edited by Moderator Marissa to update categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
If I understand what you're trying to do correctly, I don't think there's a good way to do this. I believe that at its heart, the system's time library uses the methods from the core java libraries. So CurrentDateTime() will go down into a java method to ask the JVM for the date and time. As such, there isn't a central place from within the platform to intercept that request and have it return a different value. For your own application, you can create your own methods that look to your central clock/calendar first if you want, but the out of the box platform code will still ask the JVM.
Posted: 5 years ago
Posted: 24 Aug 2017 17:01 EDT
Pete Gousios (PeterGousios_GCS)
Sr. Software Solutions Engineer
I agree with Mike, that modifying the PegaPlatform would not be the appropriate place to modify the time.
You might consider a virtual machine, as some of them support running at a different time from the physical machine clock. Stopping the application container and moving the clock forward in the virtual machine (say to test a future leap year etc, or check really long SLA's ) and then restarting could possibly work.
Pega relies on the JVM time, and while you can change the JVM timezone easily, I am not aware of a way to modify that from the server clock.
Also I would expect if you ever go backwards in time, lots of things could be problematic, such as the system pulse agent, agents in general etc.
Posted: 5 years ago
Posted: 31 Aug 2017 7:52 EDT
Thomas Rathmann (RathmannT)
We will not go back in time, only into the future. We can build an Component the get the time central, but then I will have the problem, that I have to bring this into the whole application and on the other hand I've to do calculations on of SLA's Payment dates etc.
I'm locking for an solution to bring it in on a central point as I ask for, even if you think its not an good idea ;-)
Our Application was developed over more the 6 Years and now changing it decentralized, will not be possible at all.
Please not the component for time delivery will only be activated from time to time.
As we are running on a centralized platform, we don't have the possibility that we change the Clock of the JVM.
Any Idea, where I can find the central point, where pega consumes the JVM time?
Posted: 4 years ago
Posted: 16 Mar 2018 8:48 EDT
Benjamin Harper (BenjaminH)