Commit 8833177f0ad48e2aab23b11756bc5aba2dee67da
- Diff rendering mode:
- inline
- side by side
core/web/handler/systemrequesthandler.cpp
(1 / 1)
|   | |||
| 37 | 37 | return success(DSS::getInstance()->versionString()); | |
| 38 | 38 | } else if (_request.getMethod() == "time") { | |
| 39 | 39 | std::stringstream s; | |
| 40 | s << DateTime().fromUTC().secondsSinceEpoch(); | ||
| 40 | s << DateTime().secondsSinceEpoch(); | ||
| 41 | 41 | return success(s.str()); | |
| 42 | 42 | } | |
| 43 | 43 | throw std::runtime_error("Unhandled function"); |
core/web/webserverapi.cpp
(1 / 1)
|   | |||
| 310 | 310 | .withDocumentation("Returns the dss version", | |
| 311 | 311 | "This method returns the version std::string of the dss"); | |
| 312 | 312 | clsSystem.addMethod("time") | |
| 313 | .withDocumentation("Returns the dSS time in seconds since epoch"); | ||
| 313 | .withDocumentation("Returns the dSS time in UTC seconds since epoch"); | ||
| 314 | 314 | ||
| 315 | 315 | RestfulClass& clsSet = api->addClass("set") | |
| 316 | 316 | .withInstanceParameter("self", "string", false); |

