rsked/source.cc
/// Expand any strftime symbols in the path and return in dst.
/// Returns true on success, false on failure.
/// * will NOT throw
///
Expand any strftime symbols in the path and return in dst.
Returns true on success, false on failure.
will NOT throw
Expand any strftime symbols in the path and return in dst . Returns true on success false on failure . will NOT throw
bool uri_expand_time( const std::string &src, std::string &dst )
{
    time_t rawtime;
    time(&rawtime);
    tm *timeinfo = localtime(&rawtime);
    char timebuf[320] = {0};
    if (strftime(timebuf,sizeof(timebuf)-1, src.c_str(), timeinfo)) {
        dst = std::string(timebuf);
        return true;
    } else {
        dst = src;
        LOG_WARNING(Lgr) << "failed to expand time in string--too long";
        return false;
    }
}
bool uri_expand_time ( const std :: string & src , std :: string & dst ) { time_t rawtime ; time ( & rawtime ) ; tm * timeinfo = localtime ( & rawtime ) ; char timebuf [ 320 ] = { 0 } ; if ( strftime ( timebuf , sizeof ( timebuf ) - 1 , src . c_str ( ) , timeinfo ) ) { dst = std :: string ( timebuf ) ; return true ; } else { dst = src ; LOG_WARNING ( Lgr ) << " " ; return false ; } }
Expand any strftime symbols in the path and return in dst.
Expand any strftime symbols in the path and return in dst .