mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 09:46:10 +00:00
fix: allow assignment of time points of resolutions other than that of a system clock (#2481)
This commit is contained in:
@@ -140,7 +140,7 @@ public:
|
||||
}
|
||||
else return false;
|
||||
|
||||
value = system_clock::from_time_t(std::mktime(&cal)) + msecs;
|
||||
value = time_point_cast<Duration>(system_clock::from_time_t(std::mktime(&cal)) + msecs);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user