diff --git a/li.strolch.model/src/main/java/li/strolch/model/Version.java b/li.strolch.model/src/main/java/li/strolch/model/Version.java index 06a38eb23..33f127d2d 100644 --- a/li.strolch.model/src/main/java/li/strolch/model/Version.java +++ b/li.strolch.model/src/main/java/li/strolch/model/Version.java @@ -1,6 +1,8 @@ package li.strolch.model; import java.text.MessageFormat; +import java.time.ZoneId; +import java.time.ZonedDateTime; import java.util.Date; import li.strolch.utils.dbc.DBC; @@ -154,6 +156,15 @@ public class Version { return this.created; } + /** + * Returns the date when this version was created + * + * @return the date when this version was created + */ + public ZonedDateTime getCreatedZdt() { + return ZonedDateTime.ofInstant(this.created.toInstant(), ZoneId.systemDefault()); + } + /** * Returns the date when this version was update * @@ -163,6 +174,15 @@ public class Version { return this.updated; } + /** + * Returns the date when this version was update + * + * @return the date when this version was update + */ + public ZonedDateTime getUpdatedZdt() { + return ZonedDateTime.ofInstant(this.updated.toInstant(), ZoneId.systemDefault()); + } + /** * Returns true if this version was deleted, otherwise false *