<commit_before><?php

define("FUZZY_ONE_DAY", 86400);

if (!function_exists('fuzzy_time')) {

    /**
     * @copyright (c) 2012 Codestruck, LLC.
     * @license http://opensource.org/licenses/mit-license.php/
     */
    function fuzzy_time($time = 0, $timezone = null)
    {
        if (is_numeric($time)) {
            $time = '@' . $time;
        }

        $date = new DateTime($time);
        $now = new DateTime(null);

        $date->setTimezone($timezone);
        $now->setTimezone($timezone);

        if($time === 0)
        {
            return '-';
        }

        if(!$time)
        {
            return FALSE;
        }

        if (!is_numeric($time)) {
            $time = strtotime($time);
        }

        // sod = start of day
        $sodTime = mktime(0, 0, 0, $date->format("m"), $date->format("d"), $date->format("Y"));
        $sodNow  = mktime(0, 0, 0, $now->format("m"), $now->format("d"), $now->format("Y"));

        $diff = abs($sodNow - $sodTime);
<commit_msg>Fix fuzzy_date with no timezone passed in<commit_after><?php

define("FUZZY_ONE_DAY", 86400);

if (!function_exists('fuzzy_time')) {

    /**
     * @copyright (c) 2012 Codestruck, LLC.
     * @license http://opensource.org/licenses/mit-license.php/
     */
    function fuzzy_time($time = 0, $timezone = null)
    {
        if (is_numeric($time)) {
            $time = '@' . $time;
        }

        $date = new DateTime($time);
        $now = new DateTime(null);

        if ($timezone) {
            $date->setTimezone($timezone);
            $now->setTimezone($timezone);
        }

        if($time === 0)
        {
            return '-';
        }

        if(!$time)
        {
            return FALSE;
        }

        if (!is_numeric($time)) {
            $time = strtotime($time);
        }

        // sod = start of day
        $sodTime = mktime(0, 0, 0, $date->format("m"), $date->format("d"), $date->format("Y"));
        $sodNow  = mktime(0, 0, 0, $now->format("m"), $now->format("d"), $now->format("Y"));

        $diff = abs($sodNow - $sodTime);

{'fraction_non_alphanumeric': 0.19146873485215704, 'fraction_numerical': 0.016480853126514785, 'mean_word_length': 1.8547717842323652, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '4304935', 'n_tokens_mistral': 739, 'n_tokens_neox': 684, 'n_words': 128}