
Use %z to specify hour and minute, for example -0500.For example, for 5 hours before UTC the values is -0500 which is US Eastern Standard Time. The timezone offset from UTC, in hour and minute: +hhmm or -hhmm. For example EST for US Eastern Standard Time. For US English the format for 9:30 AM is 9:30:00. The time in the format for the current locale. For example the UNIX epoch time 1484993700 is equal to Tue Jan 21 10:15:00 2020. The UNIX Epoch Time timestamp, or the number of seconds since the Epoch: 00:00:00 +0000 (UTC).

Second as a decimal number, for example 00 to 59.

The subsecond component of a UTC timestamp. Use with %I to specify the 12-hour clock for AM or PM. You can specify %3N = milliseconds, %6N = microseconds, %9N = nanoseconds.ĪM or PM. Leading zeros are accepted but not required. Minutes are represented by the values 00 to 59. Leading zeros are replaced by a space, for example 0 to 23. Like %H, the hour (24-hour clock) as a decimal number. Use with %p to specify AM or PM for the 12-hour clock. Hour (12-hour clock) with the hours represented by the values 01 to 12. Hours are represented by the values 00 to 23. Hour (24-hour clock) as a decimal number. For example, Thu Jul 18 09:30: for US English on Linux. The date and time with time zone in the current locale's format as defined by the server's operating system. For example, Thu Jul 18 09:30:00 2019 for US English on Linux. The date and time in the current locale's format as defined by the server's operating system.
#Splunk strftime timezone software#
For more information about how the Splunk software determines a time zone and the tz database, Refer to the list of tz database time zones for all permissible time zone values.

You can also use these variables to describe timestamps in event data.Īdditionally, you can use the relative_time() and now() time functions as arguments.įor more information about working with dates and time, see Time modifiers for search and About searching with time in the Search Manual. And you don't even know if the source is reporting the time properly.This topic lists the variables that you can use to define time formats in the evaluation functions, strftime() and strptime(). So you might get different results depending on when you're calling your search and you'll never know which results are proper ones. Without a timezone information within the time string you don't know whether it was in "summer time" or "winter time". But it might mean that daylight saving comes into play. Remember that if you're evaluating your search, it's parsing the time according to your user's configured timezone, which might not be a problem if you assume that none of your users will be far enough to warrant a different timezone. I'd strongly advise to reconfigure your sources so that they do include the timezone information within the timestamp. Or even, if you can enumerate hosts or sources with/without timezone, you could make a conditon based on that field. You could - since you're saying that only some subset of your events contains the timezone - do a conditional evaluation like | eval mytime=if(like(match(mytime,".*-+$"),strptime(mytime,"format with timezone"),strptime(mytime,"format without timezone") More than one time-based field in the event can cause confusion
