aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-03-14 11:48:06 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-03-14 11:48:06 -0500
commit35b0a3601f1d7d9f757467ffc7b909c461c2f49d (patch)
tree58a202901cabb4d4e41673060967ce42688e5e71 /src
parent1a8ea8bd7c6f072a187a00df339a04ca6ce382c2 (diff)
downloadayatana-indicator-datetime-35b0a3601f1d7d9f757467ffc7b909c461c2f49d.tar.gz
ayatana-indicator-datetime-35b0a3601f1d7d9f757467ffc7b909c461c2f49d.tar.bz2
ayatana-indicator-datetime-35b0a3601f1d7d9f757467ffc7b909c461c2f49d.zip
slightly better testing for whether or not a date happened in the past at second granularity rather than usec
Diffstat (limited to 'src')
-rw-r--r--src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 354e389..c9107ce 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -160,7 +160,7 @@ getDateProximity(GDateTime* now, GDateTime* time)
gint time_year, time_month, time_day;
// did it already happen?
- if (g_date_time_compare (now, time) > 0)
+ if (g_date_time_difference(time, now) < -G_USEC_PER_SEC)
return DATE_PROXIMITY_FAR;
// does it happen today?