src/Date/DateUtil.php
public function getGMTMidnightTstamp(int $tstamp)
    {
        $date = new \DateTime(date('Y-m-d', $tstamp));
        $date->setTimezone(new \DateTimeZone('GMT'));
        $date->setTime(0, 0, 0);

        return $date->getTimestamp();
    }
public function getGMTMidnightTstamp(int $tstamp)
    {
        $date = new \DateTime(date('Y-m-d', $tstamp));
        $date->setTimezone(new \DateTimeZone('GMT'));
        $date->setTime(0, 0, 0);

        return $date->getTimestamp();
    }
public function getGMTMidnightTstamp ( int $ tstamp ) { $ date = new \ DateTime ( date ( 'Y-m-d' , $ tstamp ) ) ; $ date -> setTimezone ( new \ DateTimeZone ( 'GMT' ) ) ; $ date -> setTime ( 0 , 0 , 0 ) ; return $ date -> getTimestamp ( ) ; }
transfer a given timestamp to a gmt timestamp at midnight.

@param int $tstamp

@return int
transfer a given timestamp to a gmt timestamp at midnight .