From 03340db72e8c92f84d4a2425a1a5b74ce76f2df4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 14 Jan 2019 06:01:21 +0100 Subject: Use time_t for system time values Signed-off-by: Lukas Fleischer --- src/ui-day.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui-day.c') diff --git a/src/ui-day.c b/src/ui-day.c index 979ecc0..9d76775 100644 --- a/src/ui-day.c +++ b/src/ui-day.c @@ -66,7 +66,7 @@ void ui_day_set_selitem(struct day_item *day) * for validation of the new end time. * If move = 0, the new end time is calculated by the caller. */ -static int day_edit_time(int start, int duration, int move) +static time_t day_edit_time(time_t start, long duration, int move) { const char *msg_time = _("Enter start date [%s] and/or time ([hh:mm] or [hhmm]):"); const char *enter_str = _("Press [Enter] to continue"); @@ -105,9 +105,9 @@ static int day_edit_time(int start, int duration, int move) * when the new start time is known. * If move = 1, duration is fixed, but passed on for validation of new end time. */ -static void update_start_time(long *start, long *dur, int move) +static void update_start_time(time_t *start, long *dur, int move) { - long newtime; + time_t newtime; const char *msg_wrong_time = _("Invalid time: start time must come before end time!"); const char *msg_enter = _("Press [Enter] to continue"); @@ -133,7 +133,7 @@ static void update_start_time(long *start, long *dur, int move) } /* Request the user to enter a new end time or duration. */ -static void update_duration(long *start, long *dur) +static void update_duration(time_t *start, long *dur) { const char *msg_time = _("Enter end date (and/or time) or duration ('?' for input formats):"); @@ -144,7 +144,7 @@ static void update_duration(long *start, long *dur) const char *enter_str = _("Press [Enter] to continue"); const char *fmt_msg_1 = _("Invalid time or duration."); const char *fmt_msg_2 = _("Invalid date: end time must come after start time."); - long end; + time_t end; unsigned newdur; char *timestr, *outstr; -- cgit v1.2.3-54-g00ecf