Ruby/Time/utc

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск

Query with utc? (or gmt?) to see whether it represents Coordinated Universal Time, or UTC (also known as Greenwich Mean Time or GMT)

local_time = Time.local( 2007, "jan", 30, 1, 15, 20 )
local_time.utc? # => false



Time.utc

puts Time.utc(year, month, day, hour, min, sec, msec)
puts Time.utc(2008, 8, 31, 2, 3, 4, 5)