gpt4 book ai didi

c++ - 这个 "ISOTIME"结构代表什么标准?

转载 作者:行者123 更新时间:2023-11-27 22:32:10 26 4
gpt4 key购买 nike

在我们的代码中,我们有一个 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++ - 这个 "ISOTIME"结构代表什么标准?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/893940/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com