File tree Expand file tree Collapse file tree
main/java/co/ipregistry/datasets
test/java/co/ipregistry/datasets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import java .nio .file .Files ;
99import java .nio .file .Path ;
1010import java .nio .file .Paths ;
11- import java .util . Date ;
11+ import java .time . Instant ;
1212import java .util .UUID ;
1313import java .util .concurrent .CompletableFuture ;
1414import java .util .concurrent .ExecutionException ;
@@ -86,10 +86,10 @@ public void close() throws IOException {
8686 *
8787 * @return when the dataset file in use was created.
8888 */
89- public Date getBuildDate () {
89+ public Instant getBuildDate () {
9090 Reader readerInstance = reader .get ();
9191 if (readerInstance != null ) {
92- return readerInstance .getMetadata ().getBuildDate ();
92+ return readerInstance .getMetadata ().buildTime ();
9393 }
9494 return null ;
9595 }
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public void test() throws IOException {
1818 System .getenv ("IPREGISTRY_DATASETS_SECRET_KEY" )).build ()) {
1919
2020 Assertions .assertTrue (
21- dataset .getBuildDate ().toInstant (). isAfter (
21+ dataset .getBuildDate ().isAfter (
2222 Instant .now ().minus (2 , ChronoUnit .DAYS )));
2323
2424 GeolocationData data = dataset .lookup ("8.8.8.8" );
You can’t perform that action at this time.
0 commit comments