aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui-calendar.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2019-01-14 06:01:21 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-01-14 06:21:34 +0100
commit03340db72e8c92f84d4a2425a1a5b74ce76f2df4 (patch)
tree201cba607fe49ecad3c641d25a5bb93de8f775a9 /src/ui-calendar.c
parent51f17fb9c6f80a0caa878d38e7a9ee5715722686 (diff)
downloadcalcurse-03340db72e8c92f84d4a2425a1a5b74ce76f2df4.tar.gz
calcurse-03340db72e8c92f84d4a2425a1a5b74ce76f2df4.zip
Use time_t for system time values
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/ui-calendar.c')
-rw-r--r--src/ui-calendar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui-calendar.c b/src/ui-calendar.c
index 407f294..10ae5cb 100644
--- a/src/ui-calendar.c
+++ b/src/ui-calendar.c
@@ -743,7 +743,7 @@ void ui_calendar_move(enum move move, int count)
}
/* Returns the beginning of current year as a long. */
-long ui_calendar_start_of_year(void)
+time_t ui_calendar_start_of_year(void)
{
time_t timer;
struct tm tm;
@@ -757,10 +757,10 @@ long ui_calendar_start_of_year(void)
tm.tm_sec = 0;
timer = mktime(&tm);
- return (long)timer;
+ return timer;
}
-long ui_calendar_end_of_year(void)
+time_t ui_calendar_end_of_year(void)
{
time_t timer;
struct tm tm;
@@ -775,5 +775,5 @@ long ui_calendar_end_of_year(void)
tm.tm_year++;
timer = mktime(&tm);
- return (long)(timer - 1);
+ return (timer - 1);
}