Assuming you have these dates in some defined format, you can use the class DateTime
of PHP:
$dt_local = DateTime::createFromFormat('d-m-Y', '03-04-2017');
$dt_remoto = DateTime::createFromFormat('d-m-Y', '01-04-2017');
if ($dt_local > $dt_remoto) {
echo "Local é mais recente", PHP_EOL;
} else if ($dt_local < $dt_remoto) {
echo "Remoto é mais recente", PHP_EOL;
} else {
echo "Datas são iguais", PHP_EOL;
}
The exit would be: Local é mais recente
.
Whether the date may be in any pattern defined in documentation PHP, use the class constructor itself:
$dt_local = new DateTime('03-04-2017');
$dt_remoto = new DateTime('01-04-2017');
if ($dt_local > $dt_remoto) {
echo "Local é mais recente", PHP_EOL;
} else if ($dt_local < $dt_remoto) {
echo "Remoto é mais recente", PHP_EOL;
} else {
echo "Datas são iguais", PHP_EOL;
}
In theory, any format provided in the table below will be accepted by the application.

Related or even repeated: https://answall.com/questions/33469/como-comparar-datas-em-php
– novic
what is the date format? dd/mm/yyyy?
– user60252