Skip to main content

Define custom time formats

The timestamp on an event in Imply Lumi describes when the event occurred. Lumi can parse common timestamp formats, such as ISO 8601. If your event timestamp doesn't fit a standard format, you can create a pipeline to manually assign the format using a timestamp processor. In the processor, you designate the Custom time format to define your own timestamp pattern.

The custom time format uses DateTimeFormatter syntax. For example, the pattern yyyy represents a four-digit year like 2026. If processing fails, such as from an invalid pattern, Lumi assigns the current timestamp.

Timestamp processor with custom time format

This topic provides more information about the custom time format and gives examples for common log types.

Common patterns

This section provides a subset of DateTimeFormatter syntax for common timestamp patterns. Note that all patterns are case-sensitive. For example, a lowercase m represents minutes, but an uppercase M represents month.

Don't confuse the custom time format with the POSIX standard strptime format. strptime format always uses two-character codes starting with % and doesn't use pattern repetition such as yyyy. The table includes strptime directives you can use for comparison and translation to use in Lumi.

CategoryLumi patternExampleDescriptionstrptime
Yearyy262-digit year; Java uses 2000 as the base year%y
yyyy20264-digit year%Y
MonthMM01Month number%m
MMMJanAbbreviated month name%b
MMMMJanuaryFull month name%B
Daydd162-digit day%d
HourHH23Hour based on 24-hour clock%H
Minutemm592-digit minute%M
Secondss312-digit second%S
Fraction of secondSSS123Partial seconds; specify up to 9 instances of S based on the time granularity%f (exactly six digits)
Time zonezUTCName of the time zone%Z
Z+0100Offset from UTC, where a zero offset is denoted by +0000%z
X+01:00 or ZOffset from UTC, where a zero offset is denoted by the value Z%z

Examples by log type

The following table shows the custom time patterns for some common log types:

Log typeExample timestampPattern
Windows event log (XML)2026-03-24T14:32:07.483000000Zyyyy-MM-dd'T'HH:mm:ss.SSSSSSSSSX
Palo Alto Networks firewall2026/01/22 02:20:18yyyy/MM/dd HH:mm:ss
syslog (RFC 3164)Oct 18 02:31:00MMM dd HH:mm:ss
Java application2026-03-05 21:30:58.000 CETyyyy-MM-dd HH:mm:ss.SSS z
Cisco ASAApr 01 2026 09:36:50MMM dd yyyy HH:mm:ss

For timestamps that don't contain the year component, see how Lumi assigns the missing year.

Time zone patterns

Timestamps can store the time zone in various formats, such as its name or UTC offset. The following table lists the time zone patterns you can use in the custom time format specification.

Use square brackets [] to denote optionality. For example, yyyy-MM-dd'T'HH:mm:ss[XX], if some timestamps don't have a time zone.

SymbolTime zone representationExample timestampExample pattern
zTime zone nameWed, 01 Oct 2025 13:55:36 GMTEEE, dd MMM yyyy HH:mm:ss z
ZOffset from UTC,
+HHMM or -HHMM
01/Oct/2025:22:55:36 +0900dd/MMM/yyyy:HH:mm:ss Z
XOffset from UTC, +HH2025-10-01T14:55:36+01yyyy-MM-dd'T'HH:mm:ssX
XXOffset from UTC, +HHMM2025-10-01T14:55:36+0100yyyy-MM-dd'T'HH:mm:ssXX
XXXOffset from UTC, +HH:MM2025-10-01T14:55:36+01:00yyyy-MM-dd'T'HH:mm:ssXXX
OLocalized offset from UTC,
short form
2025-10-01T14:55:36 GMT+1yyyy-MM-dd'T'HH:mm:ss O
OOOOLocalized offset from UTC,
long form
2025-10-01T14:55:36 GMT+01:00yyyy-MM-dd'T'HH:mm:ss OOOO
VVTime zone ID2025-10-01T09:55:36 America/New_Yorkyyyy-MM-dd'T'HH:mm:ss VV

Learn more

For more information, see the following topics: