summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornagachika <[email protected]>2025-04-09 17:27:37 +0900
committernagachika <[email protected]>2025-04-09 17:27:37 +0900
commit4ca521e91342165ed35cb12c9868f10e2a6aa07c (patch)
tree0e0675d16c968f6a4bf7d30f54e3e7bdde7abfe1 /time.c
parenta67e9e41846cdadad9bb2d9e9d10223c52253898 (diff)
merge revision(s) 06919949a60b42a8f30e8bd0cb075e17b05eebcd, 51bc992822f9108ad64de32d300e1cefd0e2da59, 42daa6c2a2b49b4e45f40736e25c7d182860f24a: [Backport #21141]
[Bug #21141] [DOC] Clarify what time is in UTC [Bug #21141] [DOC] Refine description of `Time#utc?` [Bug #21141] [DOC] Fix indentation
Diffstat (limited to 'time.c')
-rw-r--r--time.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/time.c b/time.c
index 082ddd43b6..0e45d522ac 100644
--- a/time.c
+++ b/time.c
@@ -3996,10 +3996,21 @@ 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
*
+ * +Time+ objects created with these methods are considered to be in
+ * UTC:
+ *
+ * * Time.utc
+ * * Time#utc
+ * * Time#getutc
+ *
+ * Objects created in other ways will not be treated as UTC even if
+ * the environment variable "TZ" is "UTC".
+ *
* Related: Time.utc.
*/