My Rails application makes use of Time.zone
so that each user can set their own timezone and see timestamps in the correct zone. However, I would like to have some content that is only available for one day, but for that one day to be the same 24 hours for all users.
In order to do that, I was going to use if Time.zone.today == Time.zone.local(year, month, day).to_date
, but obviously that will just check the 24 hours that the day is the same in the current (ie. users') timezone.
Is there any way to do this without having to change Time.zone
to the timezone I want to use first?