mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Adds ascTime function to utils
Further this function will be used by the audit logs.
This commit is contained in:
parent
888b9622c7
commit
610b10bcd5
@ -55,5 +55,12 @@ double generate_assay_unique_id() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string ascTime(time_t *t) {
|
||||||
|
std::string ts = std::ctime(t);
|
||||||
|
ts.pop_back();
|
||||||
|
return ts;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace ModSecurity
|
} // namespace ModSecurity
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ namespace ModSecurity {
|
|||||||
std::vector<std::string> split(std::string str, char delimiter);
|
std::vector<std::string> split(std::string str, char delimiter);
|
||||||
double random_number(const double from, const double to);
|
double random_number(const double from, const double to);
|
||||||
double generate_assay_unique_id();
|
double generate_assay_unique_id();
|
||||||
|
std::string ascTime(time_t *t);
|
||||||
} // namespace ModSecurity
|
} // namespace ModSecurity
|
||||||
|
|
||||||
#define SRC_UTILS_H_
|
#define SRC_UTILS_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user