Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个返回时间的方法,我想以RFC 2822格式返回时间请建议我该如何实现?
RFC 2822
简单地:
require 'time' t = Time.now formatted_time = t.rfc2822 # "Wed, 05 Oct 2011 22:26:12 -0400"
更多细节。