Hello all, I had some trouble in using SLA/Schedule functions.
With code updated to 1.14.4, having Italian timesettings , osticket that works on xammp on windows.

It results that using "Timeline Diagnostic" function in /scp/schedules.php, it goes in error:
[30-Nov-2020 17:35:20 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to BusinessHoursSchedule::addWorkingHours() must be an instance of DateTime, null given, called in C:\xampp\htdocs\support.onbit.it\include\staff\templates\schedule-diagnostic.tmpl.php on line 22 and defined in C:\xampp\htdocs\support.onbit.it\include\class.schedule.php:475
Stack trace:
#0 C:\xampp\htdocs\support.onbit.it\include\staff\templates\schedule-diagnostic.tmpl.php(26): BusinessHoursSchedule->addWorkingHours(NULL, '24', Array)
#1 C:\xampp\htdocs\support.onbit.it\include\ajax.schedule.php(110): include('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\support.onbit.it\include\class.dispatcher.php(145): ScheduleAjaxAPI->diagnostic('5')
#3 C:\xampp\htdocs\support.onbit.it\include\class.dispatcher.php(38): UrlMatcher->dispatch('5/diagnostic', Array)
#4 C:\xampp\htdocs\support.onbit.it\include\class.dispatcher.php(120): Dispatcher->resolve('5/diagnostic', Array)
#5 C:\xampp\htdocs\support.onbit.it\include\class.dispatcher.php(38): UrlMatcher->dispatch('/schedule/5/dia...', N in C:\xampp\htdocs\support.onbit.it\include\class.schedule.php on line 475
It seems that because the function $schedule->addWorkingHours on /include/staff/templates/schedule-diagnostic.tmpl.php:22 received an exception if $data['date'] is equal to '30/11/2020' (yesterday) because Format::parseDateTime($data['date']) returns null value.
The error was seen yesterday from here:

To achieve some result in testing SLA yesterday, I tried to update on /include/staff/templates/schedule-diagnostic.tmpl.php:19 this code:
if (strlen($data['date']) <= 16){
_$data['date'] = str_replace('/', '-',$data['date']);_
$data['date'] .= ' '.$schedule->getTimezone();
}
This morning, with date set to '01/12/2020' doesn't get that error.
Keeping going with tests, it seems that something gets wrong.
Here the schedule I'm using:




Here SLA:

it's set in 2 working hours (8:00-12:30, 14:30.18:30, mon-fri, with Italian Holidays)
If I open a ticket with this sla, the result seems unpredictable (less than 3 hours, does it's considering the UTC instead of correct timezone??? ):

Using Schedule Diagnostic function, I cannot simulate selecting a precise hour because of some strange limit on timeline diagnostic feature, I cannot select time.
My impression is that those funcition doesn't work correctly with datetime format DD/MM/YYYY.
By doing a test (starting from 2020-12-01 00:00:00 it calculates correctly, the issue here is how form manage datepicker, here troubles managing 24 hours settings instead am/pm):

By pressing done:

And then apply:

Do you have some ideas?
Thank you for now,
Emanuele