Hello, Isomorphic!
I got some problems with automatic timezone shift.
I have RestDataSource with JSON DSDataFormat and some DataSourceDateTimeFields inside.
When I fetch data from it, I got date as formated string (ex. "yyyy-MM-dd hh:mm Z").
This datasource is binded to some ListGrid.
And when date field is displeyed in ListGrid, time is shifted to current client timezone.
Is it possible to parse DateTime resieved from server with timezone?
How can I do it?
Example (client is in GMT+3:00)
Actual:
Received datetime in json: "2017-04-19 10:00"
Displeyed in ListGrid: "2017-04-19 13:00" (is switched to GMT+03:00)
Expected:
Received datetime in json: "2017-04-19 10:00 +0300"
Displeyed in ListGrid: "2017-04-19 10:00" (no switch, cause already in GMT+03:00)
Hope the problem is clear.
Thank you!
PS: I do not want to use DateUtil.setDefaultDisplayTimezone(), cause it is a lots of other ListGrids and DataSources in this project, and they works properly.
I got some problems with automatic timezone shift.
I have RestDataSource with JSON DSDataFormat and some DataSourceDateTimeFields inside.
When I fetch data from it, I got date as formated string (ex. "yyyy-MM-dd hh:mm Z").
This datasource is binded to some ListGrid.
And when date field is displeyed in ListGrid, time is shifted to current client timezone.
Is it possible to parse DateTime resieved from server with timezone?
How can I do it?
Example (client is in GMT+3:00)
Actual:
Received datetime in json: "2017-04-19 10:00"
Displeyed in ListGrid: "2017-04-19 13:00" (is switched to GMT+03:00)
Expected:
Received datetime in json: "2017-04-19 10:00 +0300"
Displeyed in ListGrid: "2017-04-19 10:00" (no switch, cause already in GMT+03:00)
Hope the problem is clear.
Thank you!
PS: I do not want to use DateUtil.setDefaultDisplayTimezone(), cause it is a lots of other ListGrids and DataSources in this project, and they works properly.
Comment