C++获取系统时间并转换成IOS8601(UTC)格式

char bufTime[64] = {0};
SYSTEMTIME sys;
GetLocalTime(&sys);
_snprintf(bufTime,sizeof(bufTime),"%.4d-%.2d-%.2dT%.2d:%.2d:%.2d.000+08:00",
sys.wYear,sys.wMonth,sys.wDay,
sys.wHour,sys.wMinute,sys.wSecond);

posted @ 2020-09-18 09:47  冥天笑  阅读(473)  评论(0编辑  收藏  举报