<commit_before>class Entry < ActiveRecord::Base
  belongs_to :import
  belongs_to :user

  scope :newest, -> { order("date, created_at DESC") }

  def for_today?
    date.in_time_zone(user.time_zone).beginning_of_day ==
    Time.zone.now.in_time_zone(user.time_zone).beginning_of_day
  end

  def date
    super || created_at.to_date
  end
end<commit_msg>Grab date in user's time zone when date not set<commit_after>class Entry < ActiveRecord::Base
  belongs_to :import
  belongs_to :user

  scope :newest, -> { order("date, created_at DESC") }

  def for_today?
    date == Time.zone.now.to_date
  end

  def date
    super || created_at.in_time_zone(user.time_zone).to_date
  end
end
{'fraction_non_alphanumeric': 0.10218978102189781, 'fraction_numerical': 0.0, 'mean_word_length': 4.007299270072993, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3469951', 'n_tokens_mistral': 253, 'n_tokens_neox': 247, 'n_words': 54}