<commit_before># Taken from
# https://rails.lighthouseapp.com/projects/8994/tickets/2946
# http://github.com/rails/rails/commit/6f97ad07ded847f29159baf71050c63f04282170

# Otherwise times get stored wrong during British Summer Time

# Hopefully fixed in later Rails. There is a test in spec/libs/timezone_fixes.rb

# Monkeypatch!
module ActiveRecord
  module ConnectionAdapters # :nodoc:
    module Quoting
       def quoted_date(value)
        if value.acts_like?(:time)
          zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal
          value.respond_to?(zone_conversion_method) ? value.send(zone_conversion_method) : value
        else
          value
        end.to_s(:db)
       end
    end<commit_msg>Small comment edit in timezone_fixes to remind that this can be removed in Rails 3.x<commit_after># Taken from
# https://rails.lighthouseapp.com/projects/8994/tickets/2946
# http://github.com/rails/rails/commit/6f97ad07ded847f29159baf71050c63f04282170

# Otherwise times get stored wrong during British Summer Time

# Hopefully fixed in later Rails. There is a test in spec/lib/timezone_fixes_spec.rb

# This fix is applied in Rails 3.x. So, should be possible to remove this then!

# Monkeypatch!
module ActiveRecord
  module ConnectionAdapters # :nodoc:
    module Quoting
       def quoted_date(value)
        if value.acts_like?(:time)
          zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal
          value.respond_to?(zone_conversion_method) ? value.send(zone_conversion_method) : value
        else
          value
        end.to_s(:db)
       end
    end
{'fraction_non_alphanumeric': 0.08202653799758745, 'fraction_numerical': 0.04463208685162847, 'mean_word_length': 3.5204359673024523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6097362', 'n_tokens_mistral': 577, 'n_tokens_neox': 509, 'n_words': 128}