Getting Data In

Adjust timezone for epoch style timestamp

morgancrocker
Engager

I have some log data that uses timestamps in an epoch-like format, but the issue is that they are logged as if it were in a local timezone rather than UTC. For example, 1394203884 = 14:51:24 March 6 2014 PST.

For example:

ts="1394187680", ...
ts="1394187682", ...
ts="1394187682", ...
ts="1394187682", ...

I understand that this an epoch-like forma and should always refer to UTC, but in this case it does not. Is there any way to configure Splunk to use these fields as timestamps, but not assume that they are UTC?

Update:

I should have mentioned this in the original post, I will update it. I have tried this(props.conf) and use it with other inputs, but Splunk does not seem to apply any TZ settings in this case. I believe this is because it identifies the timestamp as epoch time and assumes it is in UTC.

Tags (3)
0 Karma

lukejadamec
Super Champion

No. There are a number of posts on the topic, and to summarize them: Epoch time is UTC, and since Splunk will use the raw event timezone if one exists then Splunk will always regard epoch times as UTC.

Some things you can try:

Use another timestamp in the event if one exists.

Correct the app that is generating the bad timestamp.

Preprocess the events to correct the timestamp before sending them to the indexer.

yannK
Splunk Employee
Splunk Employee

By definition Epoch time is UTC.

http://www.unixtimestamp.com/index.php

The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC.

So the only solution is to rewrite your timestamp before splunk reads it.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...