application: Fix tm -> GDateTime year conversion
g_date_time_new() expects an actual year, while the tm struct only provides the number of years since 1900. ref: https://pubs.opengroup.org/onlinepubs/7908799/xsh/time.h.html
This commit is contained in:
@@ -412,7 +412,7 @@ gcal_application_command_line (GApplication *app,
|
||||
g_autoptr (GDateTime) initial_date = NULL;
|
||||
|
||||
initial_date = g_date_time_new (gcal_context_get_timezone (self->context),
|
||||
result.tm_year,
|
||||
result.tm_year + 1900,
|
||||
result.tm_mon,
|
||||
result.tm_mday,
|
||||
result.tm_hour,
|
||||
|
||||
Reference in New Issue
Block a user