propublica/pixel-pong — Issue #2: Default timeframe uses server timezone for 'today', not application time
Author: ghing
Created: 2011-12-24 02:34:38+00:00
State: open

In ApplicationController.timeframe, the current date is obtained with

```ruby
@today = Date.today.to_time.utc
```

(see https://github.com/propublica/pixel-pong/blob/master/app/controllers/application_controller.rb#L9)

I believe that Date.today uses the server timezone and it makes more sense to me for "today" to be set to the timezone specified in environment.rb.

I implemented a change in my fork (see 27552da1a976748f709feec86acbf7f125ed5b43) that uses Time.zone.today instead of Date.today. The commit also changes the timeframe method to use the beginning_of_day and end_of_day methods to set the bounds of the time frame.