Skip to content

Commit

Permalink
adapt to new time4j-version 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MenoData committed Apr 26, 2015
1 parent 77d5564 commit 46bd23c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.time4j</groupId>
<artifactId>time4j-tzdata</artifactId>
<version>1.1-2015b</version>
<version>1.2-2015d</version>
<packaging>jar</packaging>
<name>Time4J-TZDATA</name>

Expand Down Expand Up @@ -196,15 +196,21 @@
<dependency>
<groupId>net.time4j</groupId>
<artifactId>time4j-core</artifactId>
<version>[2.4,3.0)</version>
<version>[3.0,4.0)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.time4j</groupId>
<artifactId>time4j-olson</artifactId>
<version>[2.4,3.0)</version>
<version>[3.0,4.0)</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.time4j</groupId>
<artifactId>time4j-i18n</artifactId>
<version>[3.0,4.0)</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
20 changes: 11 additions & 9 deletions src/test/java/net/time4j/tz/repository/RepositoryTest.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
package net.time4j.tz.repository;

import net.time4j.Iso8601Format;
import net.time4j.Moment;
import net.time4j.PatternType;
import net.time4j.PlainTimestamp;
import net.time4j.format.ChronoFormatter;
import net.time4j.format.expert.ChronoFormatter;
import net.time4j.format.expert.Iso8601Format;
import net.time4j.format.expert.PatternType;
import net.time4j.tz.ZonalTransition;
import net.time4j.tz.ZoneProvider;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Locale;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

Expand Down Expand Up @@ -569,9 +570,10 @@ private static Moment atStartOfYear(int year) {

private static long parse(String time) throws ParseException {
ChronoFormatter<Moment> p =
Moment.localFormatter(
ChronoFormatter.setUp(Moment.class, Locale.ROOT).addPattern(
"uuuu-MM-dd'T'HH:mmXXXXX",
PatternType.CLDR);
PatternType.CLDR
).build();
return p.parse(time).getPosixTime();
}

Expand Down

0 comments on commit 46bd23c

Please sign in to comment.