[Fix] Make sure to store LogMessage date time with millisecond only, as is in DB

This commit is contained in:
Robert von Burg 2019-07-03 20:37:23 +02:00
parent 599ec9b3b2
commit 5063c111ad
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ public class LogMessage extends I18nMessage {
super(bundle, key);
this.id = StrolchAgent.getUniqueId();
this.zonedDateTime = ZonedDateTime.now();
// persisting in the DB only handles millisecond precision, not nano precision
this.zonedDateTime = this.zonedDateTime.withNano((this.zonedDateTime.getNano() / 1000000) * 1000000);
this.realm = realm;
this.username = username;
this.locator = locator;