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

标签 c++ datetime data-structures timezone

在我们的代码中,我们有一个 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/

相关文章:

c++ - 在 CMakeLists.txt 中链接 GSL

java - 使用首选 DateFormat 格式化 JodaTime DateTime

asp.net - ASP 密码恢复电子邮件失败,日期时间精度

c - 如何创建一个仅具有结构的矩阵,然后为矩阵中存储的每个数据创建一个线程?

algorithm - 是否有一种算法可以检测相对于数据集的奇数值

c++ - 如何使用opencv Mat reserve?与推回

c++ - 带有 cpp-netlib 的 Https 服务器

python - PySpark:将 "string-integer"列转换为 IntegerType

c++ - 错误 : pointer to incomplete class type is not allowed

c# - C++ 和 C# 规范?