[Bug #21141] [DOC] Clarify what time is in UTC

This commit is contained in:
Nobuyoshi Nakada 2025-03-15 16:15:04 +09:00
parent 35920f7a44
commit 06919949a6
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2025-03-16 03:25:13 +00:00

8
time.c
View File

@ -4015,10 +4015,18 @@ time_eql(VALUE time1, VALUE time2)
* now = Time.now
* # => 2022-08-18 10:24:13.5398485 -0500
* now.utc? # => false
* now.getutc.utc? # => true
* utc = Time.utc(2000, 1, 1, 20, 15, 1)
* # => 2000-01-01 20:15:01 UTC
* utc.utc? # => true
*
* Note that only +Time+ objects created with these methods
* considered in UTC:
*
* * Time.utc
* * Time#utc
* * Time#getutc
*
* Related: Time.utc.
*/