Yeah, this could be a good improvement. As you know, we like contributions [1]. Feel free to raise a JIRA and attach a patch.
[1] http://camel.apache.org/contributing.html Best, Christian ----------------- Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www.apache.org/foundation/members.html https://www.linkedin.com/pub/christian-mueller/11/551/642 On Mon, Jul 29, 2013 at 1:50 PM, Marco Zapletal <[email protected]>wrote: > Hi folks, > > > I recently encountered the situation that we required a Long (unix > timestamp) to java.util.Date conversion. I was pretty sure that such a > converter will exist in core-camel, but it doesn't. Furthermore, I came > across some pieces of code in camel-core, where this conversion is done > "manually" and not via a type converter - e.g., FileOperations:328 > > Date date = exchange.getIn().getHeader(**Exchange.FILE_LAST_MODIFIED, > Date.class); > if (date != null) { > last = date.getTime(); > } else { > // fallback and try a long > last = > exchange.getIn().getHeader(**Exchange.FILE_LAST_MODIFIED, > Long.class); > } > > > Is there a special reason why no Long <-> Date converter exists in the > DateTimeConverter? If not, I would suggest to open a JIRA issue and attach > a patch there. > > > Best regards, > > Marco >
