Refactoring: Created constants for datetime values (#1648)

* Refactoring: Created constants for datetime values

* Updated

* Updated

* Update tracker.php

* Update tracker.php

* Update index.php

* Update admin_log.php

* Update viewtopic.php

* Updated

* Update Poll.php

* Updated

* Updated

* Update viewtopic.php

* Update User.php

* Update privmsg.php

* Update poll.php

* Update tr_make_snapshot.php

* Update displaying_torrent.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-09-27 18:22:41 +07:00 committed by GitHub
commit 6eca29714a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 58 additions and 52 deletions

View file

@ -158,8 +158,8 @@ if ($var =& $_REQUEST[$datetime_key] && $var != $def_datetime) {
}
}
$time_end_val = 86400 + mktime(0, 0, 0, date('m', $datetime_val), date('d', $datetime_val), date('Y', $datetime_val));
$time_start_val = $time_end_val - 86400 * $daysback_val;
$time_end_val = DAY_IN_SECS + mktime(0, 0, 0, date('m', $datetime_val), date('d', $datetime_val), date('Y', $datetime_val));
$time_start_val = $time_end_val - DAY_IN_SECS * $daysback_val;
// First log time
$row = DB()->fetch_row('SELECT MIN(log_time) AS first_log_time FROM ' . BB_LOG);