4 ms·
That's not an explanation, it's a recommendation. The author does not state _why_ Time should be preferred over DateTime.
by Zikes 11y ago
That's not an explanation, it's a recommendation. The author does not state _why_ Time should be preferred over DateTime.
- fleitz 11y agoThey do, which is because Time supports timezones, etc.
- Semiapies 11y agoThe gist was updated.
- pixeltrix 11y agoSorry, don't like to be absolutist - updated the gist to clarify that you should use Time because of it's greater support for timezones, DST, etc.
- peterwwillis 11y agoThe only reason to use Time is for a marginal performance improvement. And it saves you typing four extra characters. Other than that, Time really sucks. http://stevenyue.com/2013/03/23/date-time-datetime-in-ruby-and-rails/ http://stevenyue.com/2013/03/23/date-time-datetime-in-ruby-a...