public static function createTimestamp($time = null, $format = 'Y-m-d H:i:s') {
        if ($time === null) {
            $time = time();
        }
        elseif (is_string($time)) {
            $time = strtotime($time);
        }

        return date($format, $time);
    }