civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0) Link Returns DateTime with local offset for given year if format is local else offset is zero. DateTime.civil_from_format :local, 2012 # => Sun, 01 Jan 2012 00:00:00 +0300 DateTime.civil_from_format :local, 2012, 12, 17 # => Mon, 17 Dec 2012 00:00:00 +0000 # File activesupport/lib/active_support/core_ext/date_tim