I've built a flexconnector for Microsoft Direct Access, (my first) and its working well, parsing the fields I need except for time. (This is a sdkfilereader.)
Here's the time from the DA log:
2/1/2016 10:28:12 PM
Here's from esm endtime field
As you can see, in ESM it's not adjusting for PM.
From my sdkfilereader.properties file
Here's the token:
Here's the event:
event.endTime=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH:mm:ss a)
Any ideas what I'm missing? I thought the "a" took care of am/pm.
What you have there looks right (you may need to escape the colons as below), is there any reason you aren't declaring the token as a timestamp to begin with?
token.format=MM/dd/yyyy HH\:mm\:ss a
As you suggested I added the back slashes to the event like so:
event.endTime=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH\:mm\:ss a)
but the end time still is not reflecting PM after the change: 1 Feb 2016 10:26:18 EST
I originally had the token as a TimeStamp but it did not parse at all. Endtime just showed FlexConnector test machine time (DA log events are from January-Feb) just a minute or two removed from the manager receipt time.
Here's the format line as I originally used it:
token.format=MM/dd/yyyy HH:mm:ss a
What happens if you map the value to a different timestamp field?
event.deviceCustomDate1=__createOptionalTimeStampFromString(ConnectionStartTime,MM/dd/yyyy HH\:mm\:ss a)