aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index 07a2022..fa54008 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -226,7 +226,7 @@ generate_format_string_full (gboolean show_day, gboolean show_date)
}
gchar *
-generate_format_string_at_time (GDateTime * time)
+generate_format_string_at_time (GDateTime * now, GDateTime * time)
{
/* This is a bit less free-form than for the main "now" time label. */
/* If it is today, just the time should be shown (e.g. “3:55 PM”)
@@ -236,8 +236,6 @@ generate_format_string_at_time (GDateTime * time)
gboolean show_day = FALSE;
gboolean show_date = FALSE;
- GDateTime * now = g_date_time_new_now_local();
-
/* First, are we same day? */
gint time_year, time_month, time_day;
gint now_year, now_month, now_day;
@@ -272,8 +270,6 @@ generate_format_string_at_time (GDateTime * time)
g_date_time_unref(future_bound);
}
- g_date_time_unref (now);
-
return generate_format_string_full(show_day, show_date);
}