eac/resque-durable — pull request #2 by kencheeto (2011-11-17 19:29:53+00:00)
Title: Use UTC instead of system timezone

The 'failed' named_scope uses Time.now, which looks at the system timezone. Exposed this by changing a spec:

```ruby
it 'provides audits enqueued for more than than the expected run duration' do
Timecop.freeze(@audit.duration.from_now + 1.second) do
```
to

```ruby
it 'provides audits enqueued for more than than the expected run duration' do
Timecop.freeze(@audit.timeout_at + 1.second) do
```

which has the same behavior but will test against the `@audit`'s time, not `from_now` which uses system time. An example named_scope that uses Time.now is below:

*queue_audit.rb*

```ruby
named_scope :failed, lambda {
{ :conditions => [ 'completed_at is null AND timeout_at < ?', Time.now ], :order => 'timeout_at asc' }
}
```

```
1) Failure:
test_0001_provides_audits_enqueued_for_more_than_than_the_expected_run_duration(Queue Audit::failed) [test/queue_audit_test.rb:73]:
--- expected
+++ actual
@@ -1 +1 @@
-[#]
+[]
```

After using `Time.now.utc` instead of `Time.now`, tests will pass and behavior will be correct in any system timezone.