Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I'd like to add one to the list - store your Unix time as a 64-bit value

How about actually doing the right thing and using time_t?



I'm not sure that's the right thing, due to how time_t is (not) defined. First, it can be an integer or a floating number (although the latter is unlikely). Second, the size of time_t is not defined, so it could be 32-bit or 64-bit or something else. And then there may also be endianness issues when storing time from multiple different systems. So I'd say store it either as a 64-bit value (ignoring the possible floats, converting 32- to 64-bit and handling endianness), or use a textual representation of time_t.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: