diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e04312c5..b17c0690 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,19 +3,27 @@ on: [push, pull_request] jobs: php-intl: - runs-on: ubuntu-18.04 + name: PHP-${{ matrix.php-version }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 with: fetch-depth: 1 - - run: php${{ matrix.php-version }} -v - - run: php${{ matrix.php-version }} -m - - run: composer -V - - run: composer install + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + with: + composer-options: "--no-progress --prefer-dist --optimize-autoloader" + - run: php${{ matrix.php-version }} vendor/bin/phpunit --bootstrap tests/bootstrap.php tests diff --git a/src/Iodev/Whois/Helpers/DateHelper.php b/src/Iodev/Whois/Helpers/DateHelper.php index 378fc4b1..09850fe7 100644 --- a/src/Iodev/Whois/Helpers/DateHelper.php +++ b/src/Iodev/Whois/Helpers/DateHelper.php @@ -36,6 +36,8 @@ public static function parseDate($datestamp, $inverseMMDD = false) : "{$m[3]}-{$m[1]}-{$m[2]}T00:00:00"; } elseif (preg_match('/^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})\s+\(GMT([-+]\d+:\d{2})\)$/ui', $s, $m)) { $s = "{$m[1]}T{$m[2]}{$m[3]}"; + } elseif (preg_match('/(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})\s+(CLST)$/ui', $s, $m)) { + $s = "{$m[1]}T{$m[2]}"; } return (int)strtotime($s); } diff --git a/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt b/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt index ccbc7283..0b276168 100644 --- a/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt +++ b/tests/Iodev/Whois/Modules/Tld/parsing_data/.cl/google.cl.txt @@ -1,31 +1,23 @@ -google.cl: - -ACE: google.cl (RFC-3490, RFC-3491, RFC-3492) - -Google Inc. - -Contacto Administrativo (Administrative Contact): - Nombre : MarkMonitor Inc. - Organización: - -Contacto Técnico (Technical Contact): - Nombre : MarkMonitor Inc. - Organización: - -Servidores de nombre (Domain servers): - ns3.google.net - ns4.google.net - ns1.google.net - ns2.google.net - - -Fecha de expiración (Expiration date): 2018-11-20 14:48:02 CLT - -Agente Registrador (Registrar): - MarkMonitor Inc. - -Más información (More information): - http://www.nic.cl/registry/Whois.do?d=google.cl - -Este mensajes está impreso en ISO-8859-1 -(This message is printed in ISO-8859-1) +%% +%% This is the NIC Chile Whois server (whois.nic.cl). +%% +%% Rights restricted by copyright. +%% See https://www.nic.cl/normativa/politica-publicacion-de-datos-cl.pdf +%% + +Domain name: google.cl +Registrant name: Google LLC +Registrant organisation: Google LLC +Registrar name: MarkMonitor Inc. +Registrar URL: https://markmonitor.com/ +Creation date: 2002-10-22 17:48:23 CLST +Expiration date: 2023-11-20 14:48:02 CLST +Name server: ns1.google.com +Name server: ns2.google.com +Name server: ns3.google.com +Name server: ns4.google.com + +%% +%% For communication with domain contacts please use website. +%% See https://www.nic.cl/registry/Whois.do?d=google.cl +%% \ No newline at end of file