Skip to content

Commit

Permalink
Simplify DateTimeType handling for Java Persistence API
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Nov 27, 2024
1 parent 8c1ae66 commit a1de7e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class StateHelper {
*/
public static String toString(State state) {
if (state instanceof DateTimeType type) {
return String.valueOf(type.getZonedDateTime().toInstant().toEpochMilli());
return String.valueOf(type.getInstant().toEpochMilli());
}
if (state instanceof DecimalType type) {
return String.valueOf(type.doubleValue());
Expand Down

0 comments on commit a1de7e7

Please sign in to comment.