[gnome-calendar] application: Fix tm -> GDateTime month conversion
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] application: Fix tm -> GDateTime month conversion
- Date: Wed, 15 Dec 2021 14:33:03 +0000 (UTC)
commit 02cd9b053e124b6f510b677fd6e7ab2bdf577d04
Author: Michael Webster <miketwebster gmail com>
Date: Tue Dec 14 14:38:21 2021 -0500
application: Fix tm -> GDateTime month conversion
The month argument for g_date_time_new() is 1-based,
while the tm struct is 0-based.
Follow-up to:
a0aa36b6d2ca5
ref:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/time.h.html
src/gui/gcal-application.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gui/gcal-application.c b/src/gui/gcal-application.c
index 0bd32816..75013b90 100644
--- a/src/gui/gcal-application.c
+++ b/src/gui/gcal-application.c
@@ -416,7 +416,7 @@ gcal_application_command_line (GApplication *app,
initial_date = g_date_time_new (gcal_context_get_timezone (self->context),
result.tm_year + 1900,
- result.tm_mon,
+ result.tm_mon + 1,
result.tm_mday,
result.tm_hour,
result.tm_min,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]