merge revision(s) 06919949a6, 51bc992822, 42daa6c2a2: [Backport #21141]

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

	[Bug #21141] [DOC] Refine description of `Time#utc?`

	[Bug #21141] [DOC] Fix indentation
This commit is contained in:
nagachika 2025-04-09 17:27:37 +09:00
parent a67e9e4184
commit 4ca521e913
2 changed files with 12 additions and 1 deletions

11
time.c
View file

@ -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.
*/

View file

@ -11,7 +11,7 @@
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
#define RUBY_VERSION_TEENY 7
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
#define RUBY_PATCHLEVEL 142
#define RUBY_PATCHLEVEL 143
#include "ruby/version.h"
#include "ruby/internal/abi.h"