summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-03-15 16:15:04 +0900
committerNobuyoshi Nakada <[email protected]>2025-03-16 12:09:18 +0900
commit06919949a60b42a8f30e8bd0cb075e17b05eebcd (patch)
tree7db1bf2846443d065c9617d89d6deaa7f6b9f1e9
parent35920f7a440139563e9e46686378bba062bd08c1 (diff)
[Bug #21141] [DOC] Clarify what time is in UTC
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12940
-rw-r--r--time.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/time.c b/time.c
index b12e68f69a..48eb4d7b04 100644
--- a/time.c
+++ b/time.c
@@ -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.
*/