MCPcopy Create free account
hub / github.com/ZDoom/Raze / time_to_dos

Function time_to_dos

source/common/utility/writezip.cpp:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55//==========================================================================
56
57static std::pair<uint16_t, uint16_t> time_to_dos(struct tm *time)
58{
59 std::pair<uint16_t, uint16_t> val;
60 if (time == NULL || time->tm_year < 80)
61 {
62 val.first = val.second = 0;
63 }
64 else
65 {
66 val.first = time->tm_hour * 2048 + time->tm_min * 32 + time->tm_sec / 2;
67 val.second = (time->tm_year - 80) * 512 + (time->tm_mon + 1) * 32 + time->tm_mday;
68 }
69 return val;
70}
71
72//==========================================================================
73//

Callers 1

WriteZipFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected