mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Merge branch 'master' of github.com:znc/znc
This commit is contained in:
@@ -58,8 +58,8 @@ class CAwayJob : public CTimer {
|
||||
class CAway : public CModule {
|
||||
void AwayCommand(const CString& sCommand) {
|
||||
CString sReason;
|
||||
time_t curtime;
|
||||
time(&curtime);
|
||||
timeval curtime;
|
||||
gettimeofday(&curtime, nullptr);
|
||||
|
||||
if (sCommand.Token(1) != "-quiet") {
|
||||
sReason = CUtils::FormatTime(curtime, sCommand.Token(1, true),
|
||||
|
||||
@@ -154,8 +154,10 @@ class CListSockets : public CModule {
|
||||
|
||||
CString GetCreatedTime(Csock* pSocket) {
|
||||
unsigned long long iStartTime = pSocket->GetStartTime();
|
||||
time_t iTime = iStartTime / 1000;
|
||||
return CUtils::FormatTime(iTime, "%Y-%m-%d %H:%M:%S",
|
||||
timeval tv;
|
||||
tv.tv_sec = iStartTime / 1000;
|
||||
tv.tv_usec = iStartTime % 1000 * 1000;
|
||||
return CUtils::FormatTime(tv, "%Y-%m-%d %H:%M:%S.%f",
|
||||
GetUser()->GetTimezone());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -271,9 +271,9 @@ void CLogMod::PutLog(const CString& sLine,
|
||||
}
|
||||
|
||||
CString sPath;
|
||||
time_t curtime;
|
||||
timeval curtime;
|
||||
|
||||
time(&curtime);
|
||||
gettimeofday(&curtime, nullptr);
|
||||
// Generate file name
|
||||
sPath = CUtils::FormatTime(curtime, m_sLogPath, GetUser()->GetTimezone());
|
||||
if (sPath.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user