This project is archived and is in readonly mode.
Date.yesterday on Rails3 return two days back date till 5:30 a.m., after that it returns last day
-
Andrew White
- State changed from new to duplicate
- Importance changed from to Low
This is a duplicate of #6410 Date.yesterday == Date.today - Time.now & Date.today use the local system time and Date.yesterday uses Time.zone which defaults to UTC in Rails. Use Date.current and Time.current to get the current time and date in your application.