Commit 0c0f4813 authored by Daniel Eggert's avatar Daniel Eggert
Browse files

extended timestamp parser

parent ddda876c
......@@ -24,7 +24,6 @@ import java.util.Date;
/**
* @author Daniel Eggert (daniel.eggert@gfz-potsdam.de)
*
*/
public class Timestamp implements Comparable<Timestamp>, Serializable {
......@@ -161,7 +160,13 @@ public class Timestamp implements Comparable<Timestamp>, Serializable {
return parseDate(dateTimeString);
} else if (len == 19) {
// parse full timestamp
if (dateTimeString.charAt(10) == 'T') {
// iso with missing zone
return parseISO8601(dateTimeString);
} else {
return parseTime(dateTimeString.substring(0, 8), parseDate(dateTimeString.substring(9)));
}
} else if (len == 20 || len == 24) {
return parseISO8601(dateTimeString);
}
......@@ -952,7 +957,6 @@ public class Timestamp implements Comparable<Timestamp>, Serializable {
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment