Compressor changing the dates to one day less than actual value from database

Hi Team,
 
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.
 
Thanks

8 answers

Public
Ganesh Modak February 2, 2018

We are fetching data from a database view and database is Oracle 11g

Public
Tanya Gryshko Flexmonster February 2, 2018

Hello, Ganesh,
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. datePattern: "UTC:dd/MM/yyyy").
Check out a live example (you can comment line 26 to see the difference).
Please let me know if your problem is solved.
Regards,
Tanya

Public
Ganesh Modak February 5, 2018

Hi Team.
 
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.
 
Thanks

Public
Dmytro Zvazhii Flexmonster February 5, 2018

Hello Ganesh,
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.
Regards,
Dmytro.

Public
Ganesh Modak February 6, 2018

Hi Team,
 
We would like to have following two functionalities:

  • Flexmonster Compressor:

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 

  • Flexmonster Pivot:

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
 
Thanks

Public
Dmytro Zvazhii Flexmonster February 6, 2018

Hello Ganesh,
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.
Best regards,
Dmytro.

Public
Ganesh Modak February 6, 2018

Hi,
Thank you, please let us know when the release happens.
Regards
Ganesh

Public
Dmytro Zvazhii Flexmonster February 27, 2018

Hello Ganesh,
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.
Regards,
Dmytro

Please login or Register to Submit Answer