Setting the Date for Testing Purposes
One of the common techniques used in testing is to set the date to a fixed point in time to simulate data aging in the product. By default, the date (and time) used in the system is obtained from the database server with the time zone used on the user record to offset (if used by the product). It is possible to override the system date used at a global level or at an individual user level for testing purposes.
Note: This facility is not recommended for use in production environments.
To use this facility the following must be configured:
Set the spl.runtime.options.allowSystemDateOverride to true in the spl.properties file for the online (web or business application server) or Batch (standalone).
To set the feature at the global level for an environment, navigate to the
Administration menu, General, Feature Configuration Add menu option and add a General System Configuration Feature Type with the System Override Date option in YYYY-MM-DD format. For example:
Figure 37 – Feature Configuration
If individual test users wish to use different dates, they can set the feature at the user level. This feature does not require the global override setting to be used but if the global override is also used, then this user specific setting is used. To set the date override at the user level, add the Overridden system date Characteristic Type to the individual user record (through Administration menu, Security, User Search menu option) with the Characteristic Value set to the desired date in YYYY-MM-DD format. For example:
Figure 38 – System override for individual users
When the facility is active the following applies:
The facility will only be active if the spl.runtime.options.allowSystemDateOverride parameter is set to true in the relevant spl.properties file.
If the system override through feature configuration is set, then all users using that channel will use that date for any transactions. If the feature configuration is not set, then the default current date (in accordance with the database server) is used.
If users have system date overrides as characteristics, then that user for that channel will use that date regardless if the system override is set or not.