mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
helpers.cpp: add shortened strftime() function
taken from martiis neutrino-mp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 672257906e
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-05-29 (Thu, 29 May 2014)
Origin message was:
------------------
- helpers.cpp: add shortened strftime() function
taken from martiis neutrino-mp
------------------
This commit was generated by Migit
This commit is contained in:
@@ -390,6 +390,14 @@ std::string trim(std::string &str, const std::string &trimChars /*= " \n\r\t"*/)
|
||||
return result.erase(0, result.find_first_not_of(trimChars));
|
||||
}
|
||||
|
||||
std::string strftime(const char *format, const struct tm *tm)
|
||||
{
|
||||
char buf[4096];
|
||||
*buf = 0;
|
||||
strftime(buf, sizeof(buf), format, tm);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
time_t toEpoch(std::string &date)
|
||||
{
|
||||
struct tm t;
|
||||
|
Reference in New Issue
Block a user