<commit_before>module WeiboOAuth2
  class AccessToken < OAuth2::AccessToken
    
    def validated?
      !!@expires_at && !expired?
    end

    def expired?
      expires? && (expires_at < time_convertion(Time.now, '+08:00').to_i)
    end
    

    #Convert Time from a time zone to another time zone
    #'+08:00' or '-08:00'
    #return Time
    def time_convertion(time, time_zone)
      time.getutc.getlocal(time_zone)
    end  
  end
end<commit_msg>Fix validated? method in AccessToken<commit_after>module WeiboOAuth2
  class AccessToken < OAuth2::AccessToken
    
    def validated?
      !!expires_at && !expired?
    end

    def expired?
      expires? && (expires_at < time_convertion(Time.now, '+08:00').to_i)
    end
    

    #Convert Time from a time zone to another time zone
    #'+08:00' or '-08:00'
    #return Time
    def time_convertion(time, time_zone)
      time.getutc.getlocal(time_zone)
    end  
  end
end
{'fraction_non_alphanumeric': 0.10278372591006424, 'fraction_numerical': 0.029978586723768737, 'mean_word_length': 2.847736625514403, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5871371', 'n_tokens_mistral': 349, 'n_tokens_neox': 323, 'n_words': 81}