mktime
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <time.h> 中定义
|
||
本地日历时间转换成一个划时代的时间,因为作为time_t对象,而忽略
time->tm_wday和time->yday的值。其他组件time的值并不限于其通常范围。负值的time->tm_isdst导致mktime如果夏令时在试图确定.原文:
Converts local calendar time to a time since epoch as a time_t object, ignoring the values of
time->tm_wday and time->yday. The values of other components of time are not restricted to their usual ranges. A negative value of time->tm_isdst causes mktime to attempt to determine if Daylight Saving Time was in effect.如果成功的话,会重新计算并更新中的所有字段
time,以满足他们适当的范围内.原文:
If successful, recalculates and updates all fields in
time to fit their proper ranges.目录 |
[编辑] 参数
| time | - |
[编辑] 返回值
成功或time_t-1不能表示为一个
time对象为time_t对象,因为时代的时间.[编辑] 示例
| 本章尚未完成 原因:暂无示例 |
[编辑] 另请参阅
| 因为时代的日历时间转换时间为本地时间表示 原文: converts time since epoch to calendar time expressed as local time (函数) | |
| C++ documentation for mktime
| |