mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-24 00:28:14 +00:00
[46188] fix: get unix from datetime when empty dict
This commit is contained in:
@@ -373,6 +373,9 @@ 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.is_empty(), 0, "Invalid datetime Dictionary: Dictionary is empty");
|
||||
|
||||
// Bunch of conversion constants
|
||||
static const unsigned int SECONDS_PER_MINUTE = 60;
|
||||
static const unsigned int MINUTES_PER_HOUR = 60;
|
||||
|
||||
Reference in New Issue
Block a user