You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
590 B
22 lines
590 B
TzTime.zone = TZInfo::Timezone.new("America/Fortaleza")
|
|
|
|
class Time
|
|
alias :strftime_nolocale :strftime
|
|
|
|
def strftime(format)
|
|
format = format.dup
|
|
format.gsub!(/%a/, Date::ABBR_DAYNAMES[self.wday])
|
|
format.gsub!(/%A/, Date::DAYNAMES[self.wday])
|
|
format.gsub!(/%b/, Date::ABBR_MONTHNAMES[self.mon])
|
|
format.gsub!(/%B/, Date::MONTHNAMES[self.mon])
|
|
self.strftime_nolocale(format)
|
|
end
|
|
end
|
|
|
|
|
|
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
|
|
:default => '%d/%m/%Y %H:%M',
|
|
:date_time12 => "%d/%m/%Y %I:%M%p",
|
|
:date_time24 => "%d/%m/%Y %H:%M"
|
|
)
|