This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new 77e786c Message Timestamp Router added as bean in library
77e786c is described below
commit 77e786cc460c27f03bcebfd59d1c91ae860cae70
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed May 19 07:45:04 2021 +0200
Message Timestamp Router added as bean in library
---
.../apache/camel/kamelets/utils/transform/MessageTimestampRouter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java
index 1084778..3b0fa2c 100644
---
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java
+++
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/MessageTimestampRouter.java
@@ -65,7 +65,7 @@ public class MessageTimestampRouter {
}
}
long timestamp;
- if (ObjectHelper.isNotEmpty(timestampKeyFormat) &&
ObjectHelper.isNotEmpty(rawTimestamp)) {
+ if (ObjectHelper.isNotEmpty(timestampKeyFormat) &&
ObjectHelper.isNotEmpty(rawTimestamp) &&
!timestampKeyFormat.equalsIgnoreCase("timestamp")) {
final SimpleDateFormat timestampKeyFmt = new
SimpleDateFormat(timestampKeyFormat);
timestampKeyFmt.setTimeZone(TimeZone.getTimeZone("UTC"));
timestamp = timestampKeyFmt.parse((String) rawTimestamp).getTime();