@@ -167,11 +167,11 @@ private function generateCurrencyMap(mixed $supplementalDataBundle): array
167167 }
168168
169169 if (\array_key_exists ('from ' , $ metadata )) {
170- $ metadata ['from ' ] = self ::icuPairToDate ($ metadata ['from ' ]);
170+ $ metadata ['from ' ] = self ::icuPairToDatetimeString ($ metadata ['from ' ]);
171171 }
172172
173173 if (\array_key_exists ('to ' , $ metadata )) {
174- $ metadata ['to ' ] = self ::icuPairToDate ($ metadata ['to ' ]);
174+ $ metadata ['to ' ] = self ::icuPairToDatetimeString ($ metadata ['to ' ]);
175175 }
176176
177177 if (\array_key_exists ('tender ' , $ metadata )) {
@@ -229,7 +229,7 @@ private function generateNumericToAlpha3Mapping(array $alpha3ToNumericMapping):
229229 *
230230 * @param array{0: int, 1: int} $pair
231231 */
232- private static function icuPairToDate (array $ pair ): string
232+ private static function icuPairToDatetimeString (array $ pair ): string
233233 {
234234 [$ highBits32 , $ lowBits32 ] = $ pair ;
235235
@@ -245,12 +245,13 @@ private static function icuPairToDate(array $pair): string
245245 --$ seconds ;
246246 }
247247
248- $ datetime = \DateTimeImmutable::createFromFormat ('U ' , $ seconds , new \DateTimeZone ('Etc/UTC ' ));
248+ // Note: Unlike the XML files, the date pair is already in UTC.
249+ $ datetime = \DateTimeImmutable::createFromFormat ('U ' , (string ) $ seconds , new \DateTimeZone ('Etc/UTC ' ));
249250
250251 if (false === $ datetime ) {
251252 throw new \RuntimeException ('Unable to parse ICU milliseconds pair. ' );
252253 }
253254
254- return $ datetime ->format ('Y-m-d ' );
255+ return $ datetime ->format ('Y-m-d\TH:i:s ' );
255256 }
256257}
0 commit comments