src/sitemapservice/baseruntimeinfo.cc
void BaseRuntimeInfo::SaveTimeAttribute(TiXmlElement* element,
                                    const char* name, time_t value) {
  if (value == -1) {  
    element->SetAttribute(name, "-1");
  } else {
    char value_str[256];
    strftime(value_str, sizeof(value_str), kTimeFormat, localtime(&value));
    element->SetAttribute(name, value_str);
  }
}
// Format negative time value as -1;
// Format all the other value as kTimeFormat.
Format negative time value as -1;
Format all the other value as kTimeFormat.
Format negative time value as - 1 ; Format all the other value as kTimeFormat .
void BaseRuntimeInfo::SaveTimeAttribute(TiXmlElement* element,
                                    const char* name, time_t value) {
  if (value == -1) {  
    element->SetAttribute(name, "-1");
  } else {
    char value_str[256];
    strftime(value_str, sizeof(value_str), kTimeFormat, localtime(&value));
    element->SetAttribute(name, value_str);
  }
}
void BaseRuntimeInfo :: SaveTimeAttribute ( TiXmlElement * element , const char * name , time_t value ) { if ( value == -1 ) { element -> SetAttribute ( name , " " ) ; } else { char value_str [ 256 ] ; strftime ( value_str , sizeof ( value_str ) , kTimeFormat , localtime ( & value ) ) ; element -> SetAttribute ( name , value_str ) ; } }
Format negative time value as -1;
Format all the other value as kTimeFormat.
Format negative time value as - 1 ; Format all the other value as kTimeFormat .