<commit_before>class AddTimezoneToConference < ActiveRecord::Migration
  def change
    change_table :conferences do |t|
      t.string :timezone
    end

    Conference.all.each do |conference|
      conference.timezone = "Eastern Time (US & Canada)"
      conference.save!

      conference.events.each do |event|
        event.starting_at = fixed_time conference, event.starting_at
        event.ending_at = fixed_time conference, event.ending_at
        event.save!
      end
    end

    change_column_null :conferences, :timezone, false
  end

  def fixed_time(conference, time)
    conference.parse_date_time time.strftime("%m/%d/%Y %I:%M %p")
  end
end<commit_msg>Fix bug in migration<commit_after>class AddTimezoneToConference < ActiveRecord::Migration
  def change
    change_table :conferences do |t|
      t.string :timezone
    end

    Conference.all.each do |conference|
      conference.timezone = "Eastern Time (US & Canada)"
      conference.save!

      conference.events.each do |event|
        event.starting_at = fixed_time conference, event.read_attribute(:starting_at)
        event.ending_at = fixed_time conference, event.read_attribute(:ending_at)
        event.save!
      end
    end

    change_column_null :conferences, :timezone, false
  end

  def fixed_time(conference, time)
    conference.parse_date_time time.strftime("%m/%d/%Y %I:%M %p")
  end
end
{'fraction_non_alphanumeric': 0.09097472924187726, 'fraction_numerical': 0.0, 'mean_word_length': 3.3043478260869565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6436080', 'n_tokens_mistral': 432, 'n_tokens_neox': 429, 'n_words': 100}