首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::tm

Defined in header <ctime>

?

?

struct tm;

?

?

结构,该结构保存日历日期和时间,并将其分解为其组件。

成员对象

int tm_sec

seconds after the minute – 0, 61 / 0, 60note 1

int tm_min

minutes after the hour – 0, 59

int tm_hour

hours since midnight – 0, 23

int tm_mday

day of the month – 1, 31

int tm_mon

months since January – 0, 11

int tm_year

years since 1900 (public member object)

int tm_wday

days since Sunday – 0, 6

int tm_yday

days since January 1 – 0, 365

int tm_isdst

Daylight Saving Time flag. The value is positive if DST is in effect, zero if not and negative if no information is available (public member object)

注记
  1. 距离允许一个积极的闰秒。同一分钟内的两个闰秒是不允许的,范围为0.61是C89引入的缺陷,C99%29修正了

另见

localtime

converts time since epoch to calendar time expressed as local time (function)

gmtime

converts time since epoch to calendar time expressed as Universal Coordinated Time (function)

c tm文件

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com