Trying to consume some seismic data which input has a timestamp expressed in epoch time, but a timezone offset field expressed in
[-1200, +1200]
Description
Timezone offset from UTC in minutes at the event epicenter.
the offset above has no correlation with the known props.conf TIME_FORMAT's timezones
%z UTC offset in the form +HHMM
Was thinking about setting up a custom datetime.xml but couldn't find any "extract=" variable there meant to grab offsets,
couldn't find the python module which parses datetime.xml either
How should we approach this?
Is this the format specification of the data you're working with?
If so then you don't need any translation as the time field is already milliseconds since the UTC epoch. The tz field can be used at search time to help group events based on the local time, but per the spec doesn't seem to be needed for parsing events into Splunk correctly.
You could use a props.conf setting to say TIME_FORMAT = %s%3N
although this might change slightly (and deployment may change slightly) depending on if you're using INDEXED_EXTRACTIONS, and thus could specify the field that contains the time or not.
Yes acharlieh, wanted to help a colleague which came up with this question and got carried away with the redundant offset. epoch is UTC so already provides time trustability
Yep either setting this with a TIME_PREFIX and TIME_FORMAT combo or setting JSON INDEXED_EXTRACTIONS and TIMESTAMP_FIELDS = time
You already have local epoch time.
Perhaps just add them together (or delta them, whichever works accurately) to calculate UTC epoch time.
Thanks DalJeanis,
Think I jumped the gun when I saw the offset and thus got confused
If we already have epoch (meaning UTC), we already have the real time the event happened
Was concerned about getting _time correct during indexing but UTC already ensures that
... that makes more sense.