Backend\Core\Engine\DataGridFunctions::getTime PHP Method

getTime() public static method

Format a time according the users' settings
public static getTime ( integer $timestamp ) : string
$timestamp integer The UNIX-timestamp to format as a human readable time.
return string
    public static function getTime($timestamp)
    {
        $timestamp = (int) $timestamp;
        // if invalid timestamp return an empty string
        if ($timestamp <= 0) {
            return '';
        }
        // get user setting for long dates
        $format = Authentication::getUser()->getSetting('time_format');
        // format the date according the user his settings
        return \SpoonDate::getDate($format, $timestamp, BackendLanguage::getInterfaceLanguage());
    }