MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / exec

Method exec

source/src/scriptinterpreter.cpp:95–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93{
94 QiFunc_datetime() : QiFunc(0, 1) {}
95 QiVar exec(const std::vector<QiVar>& args, QiScriptInterpreter*) const override
96 {
97 time_t s = args.empty() ? time(nullptr) : static_cast<time_t>(args[0].toInteger());
98 tm m;
99 localtime_s(&m, &s);
100 return QiVar::toString(m.tm_year + 1900) + std::string("-") + QiVar::toString(m.tm_mon + 1) + std::string("-") + QiVar::toString(m.tm_mday) + std::string(" ") + QiVar::toString(m.tm_hour) + std::string(":") + QiVar::toString(m.tm_min) + std::string(":") + QiVar::toString(m.tm_sec);
101 }
102};
103/*
104int timestamp: sec

Callers

nothing calls this directly

Calls 1

toIntegerMethod · 0.80

Tested by

no test coverage detected