diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-24 18:50:29 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 18:50:29 +1300 |
commit | 3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c (patch) | |
tree | fc2122a934e80ba7d7e5670dd1540e72a7dfc8ae /src/org/traccar/api/resource | |
parent | ebe64e810bd8e57a805a571cfd6110fbc3cd57c1 (diff) | |
parent | 0bbf8f554638cdc89d5dd618c500839554602dee (diff) | |
download | trackermap-server-3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c.tar.gz trackermap-server-3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c.tar.bz2 trackermap-server-3e1a25b54ab342bedc8d688bb6ccb3c2d6c60d0c.zip |
Merge pull request #2592 from Abyss777/excel_timezone
Fix excel export if timezone of client and server are different
Diffstat (limited to 'src/org/traccar/api/resource')
-rw-r--r-- | src/org/traccar/api/resource/ReportResource.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/api/resource/ReportResource.java b/src/org/traccar/api/resource/ReportResource.java index 2717fe01e..e37d6f01d 100644 --- a/src/org/traccar/api/resource/ReportResource.java +++ b/src/org/traccar/api/resource/ReportResource.java @@ -51,7 +51,7 @@ public class ReportResource extends BaseResource { @QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); Route.getExcel(stream, getUserId(), deviceIds, groupIds, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + DateUtil.parseDateTime(from), DateUtil.parseDateTime(to)); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -77,7 +77,7 @@ public class ReportResource extends BaseResource { @QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); Events.getExcel(stream, getUserId(), deviceIds, groupIds, types, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + DateUtil.parseDateTime(from), DateUtil.parseDateTime(to)); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -101,7 +101,7 @@ public class ReportResource extends BaseResource { @QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); Summary.getExcel(stream, getUserId(), deviceIds, groupIds, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + DateUtil.parseDateTime(from), DateUtil.parseDateTime(to)); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); @@ -125,7 +125,7 @@ public class ReportResource extends BaseResource { @QueryParam("from") String from, @QueryParam("to") String to) throws SQLException, IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); Trips.getExcel(stream, getUserId(), deviceIds, groupIds, - DateUtil.parseDate(from), DateUtil.parseDate(to)); + DateUtil.parseDateTime(from), DateUtil.parseDateTime(to)); return Response.ok(stream.toByteArray()) .header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_XLSX).build(); |