strptime()
A Python function that turns a date and time written as text into a datetime object, using a format pattern such as %b %d %H:%M:%S.
In more detail
Parsing "Mar 2 01:22:10" from an auth log with strptime gives a time with no year and no time zone, so the code must add both explicitly. Getting that wrong shifts events by hours and breaks correlation.
Related terms
- Python — A popular general-purpose programming language known for readable code and a large standard library.
- UTC — Coordinated Universal Time, the worldwide reference time that does not change with seasons or time zones.
- time zone offset — The difference between a local time and UTC, written as +01:00 or -05:00 after a timestamp.
Taught in
- Event Correlation Rules, Thresholds & Anomaly Pipelines — Security Operations & Threat Hunting (SOC)