首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >mktime和tm_isdst

mktime和tm_isdst
EN

Stack Overflow用户
提问于 2011-12-19 16:50:54
回答 1查看 35K关注 0票数 18

我看到了很多不同的观点,所以我想在这里问一下。

我读了man mktime

 (A positive or zero value for tm_isdst causes mktime() to presume initially
 that summer time (for example, Daylight Saving Time) is or is not in
 effect for the specified time, respectively.  A negative value for
 tm_isdst causes the mktime() function to attempt to divine whether summer
 time is in effect for the specified time. 

我的问题是,不应该将tm_isdst保留为-1,让系统决定是否使用dst,这样代码就变得不可知了?

我是不是遗漏了什么?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8558919

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档