[evolution] I#563 - Compare date with today using localtime(), instead of UTC
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#563 - Compare date with today using localtime(), instead of UTC
- Date: Thu, 8 Aug 2019 10:55:08 +0000 (UTC)
commit 7e56b0af1b55d5c5a38facc2224af3f75a1446bc
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 8 12:51:17 2019 +0200
I#563 - Compare date with today using localtime(), instead of UTC
Closes https://gitlab.gnome.org/GNOME/evolution/issues/563
src/calendar/gui/comp-util.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/calendar/gui/comp-util.c b/src/calendar/gui/comp-util.c
index fe19c07e77..3c8c82b8cc 100644
--- a/src/calendar/gui/comp-util.c
+++ b/src/calendar/gui/comp-util.c
@@ -1410,7 +1410,12 @@ cal_comp_util_compare_time_with_today (const ICalTime *time_tt)
return 0;
if (i_cal_time_is_date (tt)) {
- now_tt = i_cal_time_new_today ();
+ time_t now;
+
+ /* Compare with localtime, not with UTC */
+ now = time (NULL);
+ now_tt = e_cal_util_tm_to_icaltime (localtime (&now), TRUE);
+
res = i_cal_time_compare_date_only (tt, now_tt);
} else {
now_tt = i_cal_time_new_current_with_zone (i_cal_time_get_timezone (tt));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]