【发布时间】:2009-05-21 16:57:16
【问题描述】:
在我们的代码中,我们有一个 16 字节的压缩 struct,我们称之为“ISOTIME”:
typedef struct isotime {
struct {
uint16_t iso_zone : 12; // corresponding time zone
uint16_t iso_type : 4; // type of iso date
} iso_fmt;
int16_t iso_year; // year
uint8_t iso_month; // month
uint8_t iso_day; // day
uint8_t iso_hour; // hour
uint8_t iso_minute; // minute
uint8_t iso_second; // second
uint8_t iso_centi; // centi-second
uint8_t iso_hundred; // hundreds of micro-seconds
uint8_t iso_micro; // micro-seconds
uint32_t iso_unused; // pad out to 16 bytes
} ISOTIME;
我试图弄清楚这应该实施什么标准。有人有线索吗?我的 Google-fu 让我失望了。
【问题讨论】:
标签: c++ datetime data-structures timezone