Compare Dates (UTC with Local)

try to set cake to work with your locale/timezone:

in config/app.php:
    'App' => [
                'defaultLocale' => env('APP_DEFAULT_LOCALE', 'UR-LOCALE-CODE')

in config/bootstrap.php:

date_default_timezone_set('Europe/Vienna');
\Cake\I18n\I18n::locale('UR-LOCALE-CODE');

Type::build('time')->useImmutable();
Type::build('date')->useImmutable()->useLocaleParser();
Type::build('datetime')->useImmutable()->useLocaleParser();
Type::build('timestamp')->useImmutable();

now both dates should be in the same timezone and you may proced the compare