log-cf-common: let mktime determine proper tz

In some timezones, LogCustomFormatTest01 was failing as we were
specifying the wrong setting for is_dst. Instead set it to -1 so mktime
can make the decision based on the environment. Appears to fix this test
for "Brazil/East" in the summer.

Add GitHub CI tests to test this specific test with a few different
timezones.

(cherry picked from commit 468a13e052)
pull/15139/head
Jason Ish 1 month ago committed by Victor Julien
parent 1ce945e230
commit adbf372bdd

@ -1336,6 +1336,10 @@ jobs:
- run: make install-headers
- run: make install-library
- run: TZ="UTC" ./src/suricata -u -U LogCustomFormatTest01
- run: TZ="Brazil/East" ./src/suricata -u -U LogCustomFormatTest01
- run: TZ="Saskatchewan/Regina" ./src/suricata -u -U LogCustomFormatTest01
ubuntu-24-04-rust-vars:
name: Ubuntu 24.04 (RUSTC+CARGO vars)
runs-on: ubuntu-latest

@ -245,7 +245,7 @@ static int LogCustomFormatTest01(void)
tm.tm_year = 114;
tm.tm_wday = 1;
tm.tm_yday = 13;
tm.tm_isdst = 0;
tm.tm_isdst = -1;
SCTime_t ts = SCTIME_FROM_SECS(mktime(&tm));
MemBuffer *buffer = MemBufferCreateNew(62);

Loading…
Cancel
Save