diff options
| author | 2023-05-12 15:39:22 -0400 | |
|---|---|---|
| committer | 2023-05-12 15:39:22 -0400 | |
| commit | 3df0a96fc218c9bb69bb1285025e1baf22924427 (patch) | |
| tree | 20f16bae39d7500711aa7d0b0b6d8e4d3dd83fb8 | |
| parent | fix tm_from_dict year bug (diff) | |
investigating...
| -rw-r--r-- | TECH.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -16,3 +16,11 @@ The implication (which is accurate) implies that `gmtime(t) == gmtime(mktime(loc As such, the source of truth is `time_t`, which is UTC-only. When we want to modify a `time_t`, we want to use localtime to perform the modification. + +`strftime` actually can handle a `gmtime`, but various platforms are buggy. +For example, macOS `%z %Z` will correctly report UTC but will report the localtime offset. +On Linux, the same format will correctly report an offset of exactly `+0000`, but claim to be in `GMT`. +As such, `%z` and `%Z` cannot be counted on. + +Ok, `%z` and `%Z` don't work correctly because `struct tm` is often extended. +When I convert to and from a dictionary, I lose that information. |
