/*
返回本地时间与UTC时间之间的秒差。本函数主要为了解决跨平台问题,功能和MSVCRT中的_get_timezone相同。*/
int get_timezone()
{
struct tm tm;
memset(&tm, 0, sizeof(tm));
tm.tm_year = 70;
tm.tm_mday = 2;
return 24 * 3600 - (int)mktime(&tm);
}
/*
返回本地时间与UTC时间之间的秒差。本函数主要为了解决跨平台问题,功能和MSVCRT中的_get_timezone相同。*/
int get_timezone()
{
struct tm tm;
memset(&tm, 0, sizeof(tm));
tm.tm_year = 70;
tm.tm_mday = 2;
return 24 * 3600 - (int)mktime(&tm);
}