Adds ascTime function to utils

Further this function will be used by the audit logs.
This commit is contained in:
Felipe Zimmerle 2015-07-08 19:01:19 -03:00
parent 888b9622c7
commit 610b10bcd5
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -26,6 +26,7 @@ namespace ModSecurity {
std::vector<std::string> split(std::string str, char delimiter);
double random_number(const double from, const double to);
double generate_assay_unique_id();
std::string ascTime(time_t *t);
} // namespace ModSecurity
#define SRC_UTILS_H_