We have noticed this issue with the flexmonster compressor due to which dates are shown as one day less
in the pivot.
I can confirm that the issue is in compressor, because when we don’t use compressor, dates are shown correctly.
We are fetching data from a database view and database is Oracle 11g
Thank you for writing!
Compressor sends date in UTC timezone and in the browser you see the same time, but in the local timezone. For your case, we recommend configuring Flexmonster to show time in UTC timezone as well.
To achieve that please use
'datePattern' property (i.e.
Check out a live example (you can comment line 26 to see the difference).
Please let me know if your problem is solved.
In addition to UTC, can we use other timezones as well in the datePattern option ?
We would like to show the dates in any timezone that we provide in the datePattern.
Thank you for your question. For now, the component allows showing the dates either in
UTC format or in client local format. The
UTC format means that the component shows dates the same as they came from the server without applying any timezone. When the
UTC: date pattern is not applied the data will be shown depending on client’s local timezone. Therefore, it is not possible now to apply different timezone. Could you please give us some more information about your use case? It will allow us to find an appropriate solution for you.
Waiting for the update from you.
We would like to have following two functionalities:
Now it converts all the dates in UTC timezone, we should be able to pass the timezone to compressor methods, so that
it would use the passed timezone instead of default one (UTC) to parse the dates
We should be able to convert the dates in the timezone we specify. Like in datePattern now we use only “UTC:dd/MM/yyyy”,
we could use for example “CET:dd/MM/yyyy”, “JST:dd/MM/yyyy” etc
Thank you for writing. Your request sounds reasonable. Our dev team needs to take some time on the implementation. The necessary changes will be added to the version 2.415 ETA Feb26.
Thank you, please let us know when the release happens.
We are glad to inform you that the new version 2.415 is already available on our website. It includes some improvements when working with the dates. For example, now you can set the timezone for the compressor before parsing dates:
Compressor.timezone = TimeZone.getTimeZone("JST");
Speaking about the changes added to the Flexmonster Component, please find more information about new date patterns with timezones here – https://www.flexmonster.com/doc/date-and-time-formatting/#!managing-timezones.
Let us know if everything works fine for you.