Set time in autotranslater's use of IntlCalendar to prevent issues with
DST
This commit is contained in:
parent
a1ef24afba
commit
7c0ad9fa37
@ -567,6 +567,10 @@ final class NodaTimeAutotranslater {
|
||||
$dateGeneral->set(IntlCalendar::FIELD_DAY_OF_MONTH, (int)$timeInfo['zeit_zaehlzeit_tag']);
|
||||
}
|
||||
|
||||
// Set time to noon, so that time zones or DST will not make a difference
|
||||
$dateGeneral->set(IntlCalendar::FIELD_AM_PM, 0); // 0: AM, 1: PM
|
||||
$dateGeneral->set(IntlCalendar::FIELD_HOUR, 11);
|
||||
|
||||
$format = match($usecase) {
|
||||
NodaTimeAutotranslaterUseCase::MONTH => $tLang->formatYearMonthForIntlDateFormatter(),
|
||||
default => $tLang->formatFullDateForIntlDateFormatter(),
|
||||
|
Loading…
Reference in New Issue
Block a user