We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
std::time
1 parent a59aa47 commit b0342bdCopy full SHA for b0342bd
1 file changed
lib/source/pl/lib/std/time.cpp
@@ -58,6 +58,7 @@ namespace pl::lib::libstd::time {
58
59
try {
60
auto localTime = std::localtime(&time);
61
+ if (localTime == nullptr) return u128(0);
62
63
return { packTMValue(*localTime) };
64
} catch (const fmt::format_error&) {
@@ -71,6 +72,7 @@ namespace pl::lib::libstd::time {
71
72
73
74
auto gmTime = std::gmtime(&time);
75
+ if (gmTime == nullptr) return u128(0);
76
77
return { packTMValue(*gmTime) };
78
0 commit comments