mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-15 17:10:30 +00:00
AbstractNavitiaProvider: Fix to expect and return UTC times.
This commit is contained in:
parent
751e0abdcd
commit
11c4303733
1 changed files with 7 additions and 2 deletions
|
@ -20,6 +20,7 @@ package de.schildbach.pte;
|
|||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -317,11 +318,15 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
|
|||
}
|
||||
|
||||
private Date parseDate(final String dateString) throws ParseException {
|
||||
return new SimpleDateFormat("yyyyMMdd'T'HHmmss").parse(dateString);
|
||||
DateFormat format = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
|
||||
format.setTimeZone(timeZone);
|
||||
return format.parse(dateString);
|
||||
}
|
||||
|
||||
private String printDate(final Date date) {
|
||||
return new SimpleDateFormat("yyyyMMdd'T'HHmmss").format(date);
|
||||
DateFormat format = new SimpleDateFormat("yyyyMMdd'T'HHmmss");
|
||||
format.setTimeZone(timeZone);
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
private LinkedList<Point> parsePath(final JSONArray coordinates) throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue