Skip to content

Commit bd99a2e

Browse files
nobuk0kubun
authored andcommitted
[Backport #21141] [DOC] Clarify what time is in UTC
1 parent 00c6e53 commit bd99a2e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

time.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4007,10 +4007,18 @@ time_eql(VALUE time1, VALUE time2)
40074007
* now = Time.now
40084008
* # => 2022-08-18 10:24:13.5398485 -0500
40094009
* now.utc? # => false
4010+
* now.getutc.utc? # => true
40104011
* utc = Time.utc(2000, 1, 1, 20, 15, 1)
40114012
* # => 2000-01-01 20:15:01 UTC
40124013
* utc.utc? # => true
40134014
*
4015+
* Note that only +Time+ objects created with these methods
4016+
* considered in UTC:
4017+
*
4018+
* * Time.utc
4019+
* * Time#utc
4020+
* * Time#getutc
4021+
*
40144022
* Related: Time.utc.
40154023
*/
40164024

0 commit comments

Comments
 (0)