为什么这个函数在正确显示PST和UTC的同时返回Eastern_Daylight_Time而不是EDT?例如 - 2012-09-27 @ 10:07:10(Eastern_Daylight_Time)和2013-03-28 @ 07:07:27(PDT)
std::string cur_date_time()
{
static char buf[256]= {0};
time_t curtime= time (NULL); //Get the current time
struct tm *p_loctime=localtime(&curtime);//Convert it to local time representation
// Format local time in a nice format.
strftime(buf, 255, "%Y-%m-%d@%H:%M:%S(%Z)", p_loctime);
return std::string(buf);
}
我可以做一些标准格式吗?像EDT和PDT或Eastern_Daylight_Time和Pacific_Daylight_Time