By default, the system takes dates' values as they are in the cube, and the data is not affected by the user's timezone.
This solution allows you to display information in depending on a user's time zone.
7.0 and later. Needs to be tested in the earlier versions.
Dates in the cube are stored in UTC. In depending on the user's time zone, the system should return different data.
Each date-time value can be presented as an expression:
We need to convert a date in the cube to match this format. It can be accomplished with a query:
This expression returns a value of type [bigint]. We can use this query to convert a date into an integer in a custom field of the cube. This integer will present UTC date. If this field is created, then we need to install an attached plugin. It should be located under either C:\Program Files\Sisense\app\plugins (for version 7.2 and later) or C:\Program Files\Sisense\PrismWeb\plugins (for version 7.1 and earlier)
This plugin has two files:
- config.js. These are settings of a plugin.
- main.js. It is executable logic.
Configuration file adds an additional variable in global scope:
It has three parameters:
- cubeName - it is a title of the cube, which should be processed by a plugin;
- dateDimensionTable - dimension, which stores dates;
- intDimensionTable - dimension, which stores an appropriate integer.
The result of implementation:
Current time zone is GMT +02:00:
Current time zone is GMT -10:00:
Current time zone is UTC (GMT +00:00):
Filter, where dates are stored, should be a separate filter (not a part of the cascading filter). Also, this plugin allows only calendar view of the filters.
The plugin could be found at this link: