Project

General

Profile

Actions

Support #2201

closed

Timeout after changing system time via webpage

Added by Andreas Büchin about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/11/2013
Due date:
% Done:

0%

Estimated time:

Description

wt-3.3.1-rc1

Having a simple page with a WDatePicker, a WLineEdit for the actual time and a button for setting the system time.

The code for setting the system time looks like this:

cmdStr = "/bin/date -s \""+datePicker->date().toString("yyyyMMdd").toUTF8() + " "
+ timeEdit->text().toUTF8()+"\"";
system(cmdStr.c_str());

If the button is pressed the code for setting the system time is executed and working.

If the time is set to the past everything is working fine. If the time is set to the future the session is restarted.

In the wtlog following entries are found.

[2013-Sep-11 14:42:19.485727] 3030 [/ A1uI3m2cxm49i5fTHf7aKHPVKLgkARnq] [info] "WebRequest: took 56.749ms"

[2013-Sep-11 16:42:03.542288] 3030 [/ A1uI3m2cxm49i5fTHf7aKHPVKLgkARnq] [info] "WebController: timeout: expiring"

[2013-Sep-11 16:42:03.549755] 3030 - [info] "WebRequest: took 7.18407e+06ms"

[2013-Sep-11 16:42:03.565092] 3030 - [info] "Wt: session created (#sessions = 1)"

Is there a way to avoid the session timeout during the setting of the system time or to retrigger the session timeout after the time is changed?


Files

TimeUtil.C (2.36 KB) TimeUtil.C Wim Dumon, 09/16/2013 06:14 PM
TimeUtil.h (646 Bytes) TimeUtil.h Wim Dumon, 09/16/2013 06:14 PM

Updated by Wim Dumon about 11 years ago

That is indeed a problem. We need to reimplement src/web/TimeUtil.C in terms of boost::chrono::steady_clock for recent boost versions.

Can you test this drop-in replacement for the src/web/TimeUtils.C and .h attached to this ticket?

BR,

Wim.

Actions #2

Updated by Koen Deforche about 11 years ago

  • Assignee set to Wim Dumon
Actions #3

Updated by Andreas Büchin about 11 years ago

Hello Wim,

Exchanging the files helped to fix the behavior. Now the system time can be changed to the past and the future without any timeouts.

Actions #4

Updated by Wim Dumon about 11 years ago

  • Status changed from Feedback to Resolved

Excellent. The fix is on its way to the next release.

Wim.

Actions #5

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF