提交 f0ea1853 authored 作者: blu's avatar blu

upload video files

上级 d2ec972a
#include <ctime>
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char *argv[]) {
if(strcmp(argv[1], "1") == 0) {
time_t ts = atol(argv[2]);
struct tm* ptm = localtime(&ts);
char buff[20];
std::strftime(buff, 20, "%Y%m%d_%H%M%S", ptm);
cout << buff;
}else{
std::tm t;
strptime(argv[2], "%Y%m%d_%H%M%S", &t);
cout << mktime(&t);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论