Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libservicelog for openSUSE:Factory checked in at 2026-01-23 17:34:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libservicelog (Old) and /work/SRC/openSUSE:Factory/.libservicelog.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libservicelog" Fri Jan 23 17:34:15 2026 rev:33 rq:1328828 version:1.1.19 Changes: -------- --- /work/SRC/openSUSE:Factory/libservicelog/libservicelog.changes 2023-10-27 22:29:40.622779781 +0200 +++ /work/SRC/openSUSE:Factory/.libservicelog.new.1928/libservicelog.changes 2026-01-23 17:34:31.589543251 +0100 @@ -1,0 +2,6 @@ +Fri Jan 23 09:13:17 UTC 2026 - Michal Suchanek <[email protected]> + +- Fix timezone handling (jsc#PED-14538) + * libservicelog-Fix-timezone-handling-in-servicelog-ev.patch + +------------------------------------------------------------------- New: ---- libservicelog-Fix-timezone-handling-in-servicelog-ev.patch ----------(New B)---------- New:- Fix timezone handling (jsc#PED-14538) * libservicelog-Fix-timezone-handling-in-servicelog-ev.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libservicelog.spec ++++++ --- /var/tmp/diff_new_pack.fTq58Q/_old 2026-01-23 17:34:32.169567154 +0100 +++ /var/tmp/diff_new_pack.fTq58Q/_new 2026-01-23 17:34:32.169567154 +0100 @@ -1,7 +1,7 @@ # # spec file for package libservicelog # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,6 +35,7 @@ Source1: baselibs.conf Source2: libservicelog-rpmlintrc Source3: system-group-service.conf +Patch1: libservicelog-Fix-timezone-handling-in-servicelog-ev.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: librtas-devel ++++++ libservicelog-Fix-timezone-handling-in-servicelog-ev.patch ++++++ >From e04118be57df7647ccee5b09393866d2b0a678ec Mon Sep 17 00:00:00 2001 From: Sathvika Vasireddy <[email protected]> Date: Thu, 8 Jan 2026 12:26:31 +0530 Subject: [PATCH] libservicelog: Fix timezone handling in servicelog event parsing Replace mktime() with timegm() when parsing datetime fields from SQLite database. SQLite's DATETIME('NOW') returns UTC timestamps, but mktime() treats input as local time, causing incorrect timezone conversions. Use timegm() to correctly interpret the UTC timestamps from the database, ensuring accurate time representation. Tested-by: Krishan Gopal Saraswat <[email protected]> Reviewed-by: Mahesh Salgaonkar <[email protected]> Signed-off-by: Sathvika Vasireddy <[email protected]> --- src/event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event.c b/src/event.c index 32c6a9c..11358a1 100644 --- a/src/event.c +++ b/src/event.c @@ -620,17 +620,17 @@ servicelog_event_query(servicelog *slog, char *query, else if (!strcmp(name, "time_logged")) { strptime((char*)sqlite3_column_text(stmt, i), "%Y-%m-%d %T", &t); - e->time_logged = mktime(&t); + e->time_logged = timegm(&t); } else if (!strcmp(name, "time_event")) { strptime((char*)sqlite3_column_text(stmt, i), "%Y-%m-%d %T", &t); - e->time_event = mktime(&t); + e->time_event = timegm(&t); } else if (!strcmp(name, "time_last_update")) { strptime((char*)sqlite3_column_text(stmt, i), "%Y-%m-%d %T", &t); - e->time_last_update = mktime(&t); + e->time_last_update = timegm(&t); } else if (!strcmp(name, "type")) e->type = sqlite3_column_int(stmt, i); -- 2.51.0
