public static function filter($value, bool $allowNull = false, DateTimeZoneStandard $timezone = null)
    {
        if (self::valueIsNullAndValid($allowNull, $value)) {
            return null;
        }

        if ($value instanceof DateTimeStandard) {
            return $value;
        }

        if (is_int($value) || ctype_digit($value)) {
            $value = "@{$value}";
        }

        if (!is_string($value) || trim($value) == '') {
            throw new FilterException('$value is not a non-empty string');
        }

        return new DateTimeStandard($value, $timezone);
    }