The potential issue might lie in the time offset discrepancy between MySQL and PHP. For instance, when you initially install ITFlow, the system sets the default system time to GMT 0. However, when configuring ITFlow, you have the option to select your timezone, which essentially adjusts the PHP time zone. Ideally, the timezone should be established during the installation script, followed by a system reboot.
In the Pagination header code, which is utilized in almost all listing areas, a date range is sent via POST. If no specific date range is specified, the "date to" parameter defaults to the current PHP timezone date. If your timezone offset is significant enough to extend into the following day, it might result in missing data in the listings. Nevertheless, the data remains intact in the SQL database.
You can observe the relevant code snippet here under the "Date Filter" section:
$$
php
$$
$$
if ($GET['canned_date'] == "custom" && !empty($GET['dtf'])) {
$dtf = sanitizeInput($GET['dtf']);
$dtt = sanitizeInput($GET['dtt']);
} elseif ($GET['canned_date'] == "today") {
$dtf = date('Y-m-d');
$dtt = date('Y-m-d');
} elseif ($GET['canned_date'] == "yesterday") {
$dtf = date('Y-m-d', strtotime("yesterday"));
$dtt = date('Y-m-d', strtotime("yesterday"));
} elseif ($GET['canned_date'] == "thisweek") {
$dtf = date('Y-m-d', strtotime("monday this week"));
$dtt = date('Y-m-d');
} elseif ($GET['canned_date'] == "lastweek") {
$dtf = date('Y-m-d', strtotime("monday last week"));
$dtt = date('Y-m-d', strtotime("sunday last week"));
} elseif ($GET['canned_date'] == "thismonth") {
$dtf = date('Y-m-01');
$dtt = date('Y-m-d');
} elseif ($GET['canned_date'] == "lastmonth") {
$dtf = date('Y-m-d', strtotime("first day of last month"));
$dtt = date('Y-m-d', strtotime("last day of last month"));
} elseif ($GET['canned_date'] == "thisyear") {
$dtf = date('Y-01-01');
$dtt = date('Y-m-d');
} elseif ($GET['canned_date'] == "lastyear") {
$dtf = date('Y-m-d', strtotime("first day of january last year"));
$dtt = date('Y-m-d', strtotime("last day of december last year"));
} else {
$dtf = "NULL";
}
$$
To resolve this issue, you should still be able to view the records. You would need to access the advanced search and set the date to be one day in the future or adjust your PHP timezone to align with GMT 0 or a similar timezone. However, I believe this issue should be addressed during the installation process by setting timezone there and or possibly by modifying the "date to" parameter to "Today + 1 day" by default.
Just curious what timezone are you? @ZCman @Poixninja @afiadam