Browse Source

Merge pull request #60267 from timothyqiu/timestamp-fraction

Document timestamp decimal fraction in `Time`
Rémi Verschelde 3 years ago
parent
commit
50bb1846d0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      doc/classes/Time.xml

+ 3 - 0
doc/classes/Time.xml

@@ -50,6 +50,7 @@
 			<description>
 			<description>
 				Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
 				Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
 				If [code]weekday[/code] is false, then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive).
 				If [code]weekday[/code] is false, then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive).
+				[b]Note:[/b] Any decimal fraction in the time string will be ignored silently.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_datetime_dict_from_system" qualifiers="const">
 		<method name="get_datetime_dict_from_system" qualifiers="const">
@@ -171,12 +172,14 @@
 			<description>
 			<description>
 				Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.
 				Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.
 				[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string.
 				[b]Note:[/b] Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string.
+				[b]Note:[/b] Any decimal fraction in the time string will be ignored silently.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_unix_time_from_system" qualifiers="const">
 		<method name="get_unix_time_from_system" qualifiers="const">
 			<return type="float" />
 			<return type="float" />
 			<description>
 			<description>
 				Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC.
 				Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC.
+				[b]Note:[/b] Unlike other methods that use integer timestamps, this method returns the timestamp as a [float] for sub-second precision.
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>