H开发者_StackOverflow中文版ere, My timestamps code for Ruby is
#{Time.now.utc.strftime("%B #{ActiveSupport::Inflector.ordinalize(Time.now.day)}%Y%R")}".
Now I want to increase my hour by one. So how it can be possible ?
If I understand correctly you can add one hour and then format them to your previous format:
(Time.now+1.hour).utc.strftime("%B #{ActiveSupport::Inflector.ordinalize(Time.now.day)}%Y%R")
精彩评论