Upserting to OData entities in Successfactors need the date to be in the Unix (Epoch) time format. The normal datetime value can be changed to Unix time either by groovy script, or by XSLT. For eg, think the input XML like this :
We may need to create a date value in header/property, which could we use in the filter at a later point. Can be easily achieved using groovy script. Usually its very easily with normal java util class. But problems come when we have to add this based on a particular timezone. Code below :
The current datetime can be easily retrieved and assigned to a property or header with the Content Modifier Step like this. Use a Camel Expression like these :
${date:now:yyyy-MM-dd’T’00:00:00’Z’}
or
${date:now:yyyy-MM-dd}
based on the date format you need.
But the problem comes when you need the time in different timezone. For eg, I wanted time in CET, but the camel expression always gives the time in UTC zone. This could be tackled with a groovy script to convert the time into any desired timezone.