summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-02-13 18:19:38 -0800
committerPavel Roskin <plroskin@gmail.com>2016-02-13 18:31:47 -0800
commitfe055e989aef5954279af6bec70918b41597e268 (patch)
treed7ef72d25145266cbef063c34e89ce48702f72a4
parent81779ddb0137cda54362aae11cb05ae8e33b8297 (diff)
downloadxrdp-proprietary-fe055e989aef5954279af6bec70918b41597e268.tar.gz
xrdp-proprietary-fe055e989aef5954279af6bec70918b41597e268.zip
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.
-rw-r--r--sesman/session.c2
1 files changed, 1 insertions, 1 deletions
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(&ltime, &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;