1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Actualize Time#inspect docs

This commit is contained in:
zverok 2019-12-21 22:37:35 +02:00 committed by Nobuyoshi Nakada
parent 5fa9c2eeb0
commit 4988843188
Notes: git 2019-12-22 23:18:03 +09:00

11
time.c
View file

@ -4091,14 +4091,15 @@ time_to_s(VALUE time)
* call-seq:
* time.inspect -> string
*
* Returns a detailed string representing _time_.
* Returns a detailed string representing _time_. Inlike to_s, preserves
* nanoseconds in representation for easier debugging.
*
* t = Time.now
* t.to_s #=> "2012-11-10 18:16:12 +0100"
* t.strftime "%Y-%m-%d %H:%M:%S %z" #=> "2012-11-10 18:16:12 +0100"
* t.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
* t.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100"
*
* t.utc.to_s #=> "2012-11-10 17:16:12 UTC"
* t.strftime "%Y-%m-%d %H:%M:%S UTC" #=> "2012-11-10 17:16:12 UTC"
* t.utc.inspect #=> "2012-11-10 17:16:12.261257655 UTC"
* t.strftime "%Y-%m-%d %H:%M:%S.%N UTC" #=> "2012-11-10 17:16:12.261257655 UTC"
*/
static VALUE