记录一下
char * timestamp_to_rfc3339_string(time_t timestamp) {
char timestamp_str[22];
struct tm *ret;
#ifndef _WIN32
struct tm gmt;
ret = gmtime_r(×tamp,&gmt);
#else
ret = gmtime(×tamp);
#endif
snprintf(timestamp_str, sizeof(timestamp_str), "%4d-%02d-%02dT%02d:%02d:%02dZ",
ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
return em_strdup(timestamp_str);
}