list/history: Use intl's default locale to format time and date (#5170)

This commit is contained in:
Johannes Meyer 2024-08-07 13:30:07 +02:00 committed by GitHub
commit ff0fc55907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ $modReason = [];
if (isset($requiredVendor, $requiredProject) && $requiredVendor && $requiredProject) {
// TODO: I don't like this, can we define requirements somewhere else?
$coreDeps = ['icinga-php-library' => '>= 0.13', 'icinga-php-thirdparty' => '>= 0.12'];
$coreDeps = ['icinga-php-library' => '>= 0.13.2', 'icinga-php-thirdparty' => '>= 0.12'];
foreach ($coreDeps as $libraryName => $requiredVersion) {
if (! $libraries->has($libraryName)) {

View File

@ -395,7 +395,7 @@ You will need to install certain dependencies depending on your setup:
monitor your infrastructure
* A web server, e.g. Apache or Nginx
* PHP version ≥ 7.2
* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (≥ 0.13)
* [Icinga PHP Library (ipl)](https://github.com/Icinga/icinga-php-library) (≥ 0.13.2)
* [Icinga PHP Thirdparty](https://github.com/Icinga/icinga-php-thirdparty) (≥ 0.12)
* The following PHP modules must be installed: cURL, json, gettext, fileinfo, intl, dom, OpenSSL and xml
* The [pdfexport](https://github.com/Icinga/icingaweb2-module-pdfexport) module (≥0.10) is required for the

View File

@ -30,7 +30,7 @@ $history->limit($limit * $page);
?>
<div class="content">
<?php
$dateFormatter = new IntlDateFormatter(setlocale(LC_TIME, 0), IntlDateFormatter::FULL, IntlDateFormatter::NONE);
$dateFormatter = new IntlDateFormatter(Locale::getDefault(), IntlDateFormatter::FULL, IntlDateFormatter::NONE);
$lastDate = null;
$flappingMsg = $this->translate('Flapping with a %.2f%% state change rate');
$rowAction = Url::fromPath('monitoring/event/show');

View File

@ -602,7 +602,7 @@ class WebWizard extends Wizard implements SetupWizard
)));
$set->add(new WebLibraryRequirement(array(
'condition' => ['icinga-php-library', '>=', '0.13.0'],
'condition' => ['icinga-php-library', '>=', '0.13.2'],
'alias' => 'Icinga PHP library',
'description' => mt(
'setup',