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.
ulab-next-nosound
Pavel Roskin 9 years ago
parent 81779ddb01
commit fe055e989a

@ -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;

Loading…
Cancel
Save