diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-05-24 12:25:17 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-05-24 13:37:36 +0200 |
commit | 62efa30ed239b89538730a9528e10af50cdce1a1 (patch) | |
tree | 6d301038e5625e9911a54190594aaea260449031 /doc/classes | |
parent | 9cf1d034a7f08c37f3c7f4660c50c8784864daa3 (diff) |
OS: Better validation of invalid input for get_unix_time_from_datetime
Default missing keys to Unix time 0 (1970-01-01 at 00:00:00 UTC).
Abort if year <= 0, this is not supported by the current algorithm.
Prevents an infinite loop further down.
Fixes #49022.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/OS.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 05826ecbf0..b8b437f78f 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -368,7 +368,7 @@ <description> Gets an epoch time value from a dictionary of time values. [code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code]. - If the dictionary is empty [code]0[/code] is returned. + If the dictionary is empty [code]0[/code] is returned. If some keys are omitted, they default to the equivalent values for the UNIX epoch timestamp 0 (1970-01-01 at 00:00:00 UTC). You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored. </description> </method> |