James Byrne wrote:
> It seems that I am not overriding the AR:BASE.default_timezone setting
> since, as far as I can tell, the values stored are the same whatever
> value I set the default_tz to.
>
Well, after a very frustrating afternoon I have finally uncovered what
is going on. The proble
David Chelimsky wrote:
> Now this violates a principle that you shouldn't stub things on the
> object you're spec'ing, but the alternative is to play with global
> values, which violates other principles. This is the simplest way IMO.
> But if you're concerned about internals of AR changing, you c
On Mon, Feb 9, 2009 at 9:12 AM, James Byrne wrote:
> I have the following library code:
>
>def normal_time_now
> return DateTime.now.utc if default_timezone == :utc
> return DateTime.now
>end
>
> This is dependent upon a setting in config/environment.rb
>
> # Make Active Record
I have the following library code:
def normal_time_now
return DateTime.now.utc if default_timezone == :utc
return DateTime.now
end
This is dependent upon a setting in config/environment.rb
# Make Active Record use UTC-base instead of local time
config.active_record.defaul