You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
[46188] fix: get unix from datetime when empty dict
(cherry picked from commit 1e820b3d9d)
This commit is contained in:
committed by
Rémi Verschelde
parent
0def17e80a
commit
7e5020b2fa
@@ -798,6 +798,8 @@ Dictionary _OS::get_time(bool utc) const {
|
||||
* @return epoch calculated
|
||||
*/
|
||||
int64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
|
||||
// if datetime is an empty Dictionary throws an error
|
||||
ERR_FAIL_COND_V_MSG(datetime.empty(), 0, "Invalid datetime Dictionary: Dictionary is empty");
|
||||
|
||||
// Bunch of conversion constants
|
||||
static const unsigned int SECONDS_PER_MINUTE = 60;
|
||||
|
||||
Reference in New Issue
Block a user