Skip to content

Commit

Permalink
Pull request #647: Rounds the eventTime to nearest second.
Browse files Browse the repository at this point in the history
Merge in MC/connect from feature/ROCKSOLID-9690-cures-issue-audit-log-error-with-sqlserver-as-mirthdb to development

* commit 'f56ec65525a2917b38007560e51a1af7d76ad0f1':
  Rounds the eventTime to nearest second.
  • Loading branch information
Peter Ladesma authored and lmillergithub committed Nov 29, 2022
2 parents a01a09a + f56ec65 commit e0db549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/com/mirth/connect/model/ServerEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public String toExportStringWithNoId() {
// Round the event time because SQLServer automatically rounds the milliseconds of its
// DATETIMEs. This allows us to consistently compare ServerEvents from the database
// to in-memory ones.
Date roundedEventTime = new Date(Math.round(eventTime.getTimeInMillis() / 10.0));
Date roundedEventTime = new Date(Math.round(eventTime.getTimeInMillis() / 1000.0));
builder.append(new SimpleDateFormat(Exportable.DATE_TIME_FORMAT).format(roundedEventTime) + ", ");

builder.append(level + ", ");
Expand Down

0 comments on commit e0db549

Please sign in to comment.