Using TomEE 7.1.0 Plus
when using jax-rs endpoint the dates in my objects are getting changed
presumably using timezone data.
for example the uk is now in summer time so the date 2019-08-17T00:00:00
becomes 2019-08-16T23:00:00 even when i am not using the time part of
the date.
i am using momentjs and moment(date).utc() is supposed to bring the date
back to utc but that does not work as the json doesn't seem to include
the original date but the recalculated date
i also tried using a date converter like
public class DateConverter implements Converter<Date> {
@Override
public String toString(final Date instance) {
final Calendar cal = GregorianCalendar.getInstance();
cal.setTime(instance);
return DatatypeConverter.printDateTime(cal);
}
@Override
public Date fromString(final String text) {
return DatatypeConverter.parseDateTime(text).getTime();
}
}
but it doesn't make any difference
is there any documentation on this?