I am accessing a web service that returns the date/time attribute (OldTime) in the following epoch/timezone format: 1352984400000+1100. The format is Milliseconds+hours.
I have successfully created created the following workflow:
1) Split the attribute using "+"
2) Expose the _list{0} and _list{1} values
3) Create new attribute to hold milliseconds to seconds EpochNoZone: @Evaluate(@Value(_list{0})*0.001)
4) Create new attribute to hold time zone hours to seconds called TimeZone: @div(@Value(_list{1})*60*60,100)
5) Create new attribute called NewTime which is the sum of EpochNoZone and TimeZone. NewTime now contains the epoch time in seconds.
6) Finally, feed the NewTime attribute into the DateTimeConverter using the Input Format: %s$
7) NewTime will now hold the value 20121116000000 - correct time in %Y%m%d%H%M%S
However, it would be much simpler if I could feed in the initial OldTime attribute into the DateTimeConverter transformer with the following input format: %s + %H
Is it possible to convert an epoch time (+ timezone) using the DateTimeConverter without splitting up the attribute or manipulating the attribute beforehand?
Thanks,