From fe055e989aef5954279af6bec70918b41597e268 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 13 Feb 2016 18:19:38 -0800 Subject: [PATCH] Fix connection month display in xrdp-sesadmin tm_mon in `struct tm` uses 0 for January. `struct session_data` and `struct SCP_DISCONNECTED_SESSION` don't specify how dates are stored. But considering the code in sestest and sesadmin, all date components are stored as displayed. --- sesman/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sesman/session.c b/sesman/session.c index 8c3ccc17..67c5fc6f 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -778,7 +778,7 @@ session_start_fork(int width, int height, int bpp, char *username, ltime = g_time1(); localtime_r(<ime, &stime); temp->item->connect_time.year = (tui16)(stime.tm_year + 1900); - temp->item->connect_time.month = (tui8)stime.tm_mon; + temp->item->connect_time.month = (tui8)(stime.tm_mon + 1); temp->item->connect_time.day = (tui8)stime.tm_mday; temp->item->connect_time.hour = (tui8)stime.tm_hour; temp->item->connect_time.minute = (tui8)stime.tm_min;