Detect date used with PHP

-3

How do I detect the date of the user through php ? That is, I know how to detect the date, but make the comparison with the date of the server, so it does not get right due to the different time zones. I leave below my code:

<?PHP
    $current = date("d/m");
    $date    = "14/02";
    if ($current == $date){
        echo “qualquer coisa”;
    }
?>
    
asked by anonymous 12.02.2018 / 01:47

1 answer

0

DateTime :: getTimezone () - Returns the time zone that corresponds to an informed DateTime DateTimeZone :: __ construct () - Creates a new DateTimeZone object

For more information see the links below link link

    
12.02.2018 / 14:19