Hi, i have a question re. LocalTime. In my world, it's a time without any concept of offset or zone, which is what i need in a particular use case. So i thought i'd try to send that from the server.
However, it seems that it still gets offset when transmitted.
I have a SpringBean as a datasource, it returns a "ScheduleSettings" object you can see below.
0. Debugger when creating the object to return:
1. The class i return from my fetch method:
2. This is what is sent in the Data field over the network:
{defStart:new Date(25200000),defEnd:new Date(50400000)....more stuff.}
3. When i then try to get the parameter out, it's a Date that has been offset by zone just like anything else:
gives: defStart -> Thu Jan 01 08:00:00 GMT+100 1970. As you can see it's been offset by one hour from UTC (where my browser is at)
---
I think that localdate/time should not deal with timezone offsets at all since that's the way they should work. Or am i missing something?
Pointers appreciated.
However, it seems that it still gets offset when transmitted.
I have a SpringBean as a datasource, it returns a "ScheduleSettings" object you can see below.
0. Debugger when creating the object to return:
1. The class i return from my fetch method:
Code:
@Getter @AllArgsConstructor public class ScheduleSettings { private final LocalTime defStart; private final LocalTime defEnd; .....other fields }
{defStart:new Date(25200000),defEnd:new Date(50400000)....more stuff.}
3. When i then try to get the parameter out, it's a Date that has been offset by zone just like anything else:
Code:
if (resp.getStatus() == DSResponse.STATUS_SUCCESS) { Map dataAsMap = resp.getDataAsMap(); for (Object o1 : dataAsMap.keySet()) { GWT.log(o1 + " -> " + dataAsMap.get(o1)); }
---
I think that localdate/time should not deal with timezone offsets at all since that's the way they should work. Or am i missing something?
Pointers appreciated.
Comment