{
struct tm *tm = gmtime(&t);
- sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d'",
+ sprintf(tbuf,"'%4d-%02d-%02d %02d:%02d:%02d UTC'",
tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour,tm->tm_min,tm->tm_sec);
switch (i->second) {
case JobStatus::INT_T:
case JobStatus::STRING_T:
+ case JobStatus::TIMEVAL_T:
std::cerr << JobStatus::getAttrName(i->first) << ", ";
default: break;
}
}
}
+extern "C" { char * TimeToStr(time_t); }
+
void print_fields(void **ff,const edg_wll_NotifId n,edg_wll_JobStat const *s)
{
std::vector<JobStatus::Attr> *fields = (std::vector<JobStatus::Attr> *) ff;
std::string val = stat.getValString(a->first);
std::cout << (val.empty() ? "(null)" : escape(val)) << '\t';
} break;
+ case JobStatus::TIMEVAL_T: {
+ struct timeval t = stat.getValTime(a->first);
+ std::cout << TimeToStr(t.tv_sec) << '\t';
+ } break;
default:
std::cout << "(unsupported)";
break;