Skip to content

Commit

Permalink
Refactor date and time initialization logic.
Browse files Browse the repository at this point in the history
#deploy-oppdrag-service

Changed the LOCAL_DATE and LOCAL_DATE_TIME initializations to use fixed values for consistency in tests. Reformatted DB2_DATE_TIME_FORMAT and adjusted its parsing mechanism accordingly.
  • Loading branch information
krharum committed Nov 4, 2024
1 parent 27257c0 commit ad7f2ec
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
@UtilityClass
public class Oppdragsdata {

public static final LocalDate LOCAL_DATE = LocalDate.now();
public static final LocalDateTime LOCAL_DATE_TIME = LocalDateTime.now();

public static final LocalDate LOCAL_DATE = LocalDate.of(2024,11,4);
public static final String TARGET_DATE_FORMAT = DateTimeFormatter
.ofPattern("dd-MM-yyyy").format(LOCAL_DATE);
public static final String DB2_DATE_TIME_FORMAT = DateTimeFormatter
.ofPattern("yyyy-MM-dd-HH.mm.ss.SSSSSS").format(LOCAL_DATE_TIME);

public static final String DB2_DATE_TIME_FORMAT = "2024-11-04-07.17.34.123456";
public static final LocalDateTime LOCAL_DATE_TIME = LocalDateTime.from(DateTimeFormatter
.ofPattern("yyyy-MM-dd-HH.mm.ss.SSSSSS").parse(DB2_DATE_TIME_FORMAT));

public static final String TEXT_VALUE = "tekst";
public static final Integer NUMBER_VALUE = 123;
Expand Down

0 comments on commit ad7f2ec

Please sign in to comment.