DateTime::Format::W3CDTF fails to parse datetime strings containing fractional seconds when used with Specio 0.50+.
DateTime 1.66 requires Specio 0.50+, which has stricter integer validation. This exposes a bug in DateTime::Format::W3CDTF that was previously hidden.
# DateTime 1.65 + Specio 0.49 (works)
docker build -f Dockerfile.1.65 -t datetime-bug:1.65 .
docker run --rm datetime-bug:1.65
# DateTime 1.66 + Specio 0.50+ (fails)
docker build -f Dockerfile.1.66 -t datetime-bug:1.66 .
docker run --rm datetime-bug:1.66DateTime version: 1.65
DateTime::Format::W3CDTF version: 0.08
Parsing: 2026-02-20T14:59:45.268Z
Success: 2026-02-20T14:59:45
DateTime version: 1.66
DateTime::Format::W3CDTF version: 0.08
Parsing: 2026-02-20T14:59:45.268Z
Error: Validation failed for type named Nanosecond ... with value 268000000
- Specio 0.50 introduced stricter validation for integer types (
PositiveOrZeroInt) DateTime::Format::W3CDTFpasses nanoseconds as a floating-point number instead of an integer- DateTime 1.66 requires Specio 0.50+, so users upgrading to DateTime 1.66 will encounter this bug
DateTime::Format::W3CDTF line 101:
# Current code (produces float)
$p{nanosecond} = $p{fraction} * 1_000_000_000;
# Fix (produces integer)
use POSIX qw(floor);
$p{nanosecond} = floor($p{fraction} * 1_000_000_000);