Commit e992755e authored by R.W.Majeed's avatar R.W.Majeed

deprecate functions without timezone info

parent 75c3e7dc
......@@ -66,26 +66,32 @@ public class DateTimeAccuracy implements Comparable<DateTimeAccuracy> {
this.instant = instant;
this.accuracy = ChronoUnit.SECONDS;
}
@Deprecated
public DateTimeAccuracy(int year) {
instant = LocalDateTime.of(year, 1, 1, 0, 0).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.YEARS;
}
@Deprecated
public DateTimeAccuracy(int year, int month) {
instant = LocalDateTime.of(year, month, 1, 0, 0).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.MONTHS;
}
@Deprecated
public DateTimeAccuracy(int year, int month, int day) {
instant = LocalDateTime.of(year, month, day, 0, 0).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.DAYS;
}
@Deprecated
public DateTimeAccuracy(int year, int month, int day, int hours) {
instant = LocalDateTime.of(year, month, day, hours, 0).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.HOURS;
}
@Deprecated
public DateTimeAccuracy(int year, int month, int day, int hours, int mins) {
instant = LocalDateTime.of(year, month, day, hours, mins).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.MINUTES;
}
@Deprecated
public DateTimeAccuracy(int year, int month, int day, int hours, int mins, int secs) {
instant = LocalDateTime.of(year, month, day, hours, mins, secs).toInstant(ZoneOffset.UTC);
accuracy = ChronoUnit.SECONDS;
......@@ -141,7 +147,7 @@ public class DateTimeAccuracy implements Comparable<DateTimeAccuracy> {
@Override
public String toString(){
return toPartialIso8601();
return toPartialIso8601(ZoneOffset.UTC.normalized());
}
/**
......@@ -245,6 +251,7 @@ public class DateTimeAccuracy implements Comparable<DateTimeAccuracy> {
* @throws ParseException for unparsable string
* @throws IllegalArgumentException unparsable string (old unchecked exception)
*/
@Deprecated
public static DateTimeAccuracy parsePartialIso8601(String str)throws ParseException{
return parsePartialIso8601(str, null);
}
......
......@@ -65,7 +65,7 @@ public class GroupedXMLReader implements ObservationSupplier {
private Map<String,String> visitData;
private ZoneId zoneId;
@Deprecated
public GroupedXMLReader(ObservationFactory factory, InputStream input)throws JAXBException, XMLStreamException, FactoryConfigurationError{
this(factory, input, null);
}
......@@ -82,6 +82,7 @@ public class GroupedXMLReader implements ObservationSupplier {
public GroupedXMLReader(ObservationFactory factory, InputStream input, ZoneId localZone)throws JAXBException, XMLStreamException, FactoryConfigurationError{
this(factory, XMLInputFactory.newInstance().createXMLStreamReader(input), localZone);
}
@Deprecated // TODO remove method without zoneid
public GroupedXMLReader(ObservationFactory factory, XMLStreamReader reader) throws JAXBException, XMLStreamException{
this(factory,reader,null);
}
......
Markdown is supported
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