| 34 | |
| 35 | namespace { |
| 36 | inline void OldDate8601(char* buf, size_t bufLen, time_t when) { |
| 37 | struct tm theTm; |
| 38 | struct tm* ret = nullptr; |
| 39 | |
| 40 | ret = GmTimeR(&when, &theTm); |
| 41 | |
| 42 | if (ret) { |
| 43 | snprintf(buf, bufLen, "%04d-%02d-%02dT%02d:%02d:%02dZ", theTm.tm_year + 1900, theTm.tm_mon + 1, theTm.tm_mday, theTm.tm_hour, theTm.tm_min, theTm.tm_sec); |
| 44 | } else { |
| 45 | *buf = '\0'; |
| 46 | } |
| 47 | } |
| 48 | } // namespace |
| 49 | |
| 50 | Y_UNIT_TEST_SUITE(TestSprintDate) { |
no test coverage detected