Commit e1d88e3
committed
date, touch: adapt to parse_datetime 0.13.0 API changes
Fixes #8754
parse_datetime 0.13.0 fixes the bug where parsing large second values
like "12345.123456789 seconds ago" would fail with "invalid date".
However, parse_datetime 0.13.0 introduced a breaking API change:
- Old (0.11.0): Returns chrono::DateTime
- New (0.13.0): Returns jiff::Zoned
This commit adapts both date and touch utilities to work with the new API:
date.rs changes:
- Simplified parse_date() to directly return jiff::Zoned
- Removed unnecessary chrono -> jiff conversion code
- parse_datetime now returns the exact type date utility uses
touch.rs changes:
- Added jiff::Zoned -> chrono::DateTime conversion in parse_date()
- Changed from parse_datetime_at_date to parse_datetime
- Marked ref_time parameter as unused (preserved for future use)
Note: 3 integration tests fail due to timezone handling changes in
parse_datetime 0.13. These are separate issues that will be addressed
in follow-up commits.1 parent 2a69918 commit e1d88e3
3 files changed
+16
-16
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
| 409 | + | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 415 | + | |
423 | 416 | | |
424 | 417 | | |
425 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
641 | 649 | | |
642 | 650 | | |
643 | 651 | | |
| |||
0 commit comments