Commit e30e751
fix: normalize timestamps to UTC for consistent comparisons
Address timezone correctness issues flagged in code review:
- Parse FTP MDTM timestamps as UTC-aware (RFC 3659 defines MDTM as UTC)
in both get_mtime_via_conn() and get_remote_mtime()
- Use datetime.fromtimestamp(st_mtime, tz=timezone.utc) for local file
mtime so both sides of comparisons are UTC-aware
- Normalize _get_meta_timestamp() to always return UTC-aware datetimes,
handling both aware and naive ISO timestamps from frames-meta.json
- Gate recheck_existing size comparison on remote_mtime is None so it
only fires as a fallback when MDTM is unavailable, preventing
downloads of older files that happen to differ in size
https://claude.ai/code/session_0197c48GcqyW92ZGQ3Gm1WJw
Signed-off-by: Claude <noreply@anthropic.com>1 parent 1dccd25 commit e30e751
File tree
2 files changed
+46
-20
lines changed- src/zyra/connectors/backends
- tests/connectors
2 files changed
+46
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | 439 | | |
437 | 440 | | |
438 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| |||
521 | 526 | | |
522 | 527 | | |
523 | 528 | | |
524 | | - | |
| 529 | + | |
| 530 | + | |
525 | 531 | | |
526 | 532 | | |
527 | 533 | | |
| |||
543 | 549 | | |
544 | 550 | | |
545 | 551 | | |
546 | | - | |
| 552 | + | |
547 | 553 | | |
548 | 554 | | |
549 | 555 | | |
550 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
| |||
620 | 628 | | |
621 | 629 | | |
622 | 630 | | |
623 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
624 | 636 | | |
625 | 637 | | |
626 | 638 | | |
| |||
631 | 643 | | |
632 | 644 | | |
633 | 645 | | |
634 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
635 | 653 | | |
636 | 654 | | |
637 | 655 | | |
| |||
687 | 705 | | |
688 | 706 | | |
689 | 707 | | |
690 | | - | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
691 | 711 | | |
692 | 712 | | |
693 | 713 | | |
| |||
709 | 729 | | |
710 | 730 | | |
711 | 731 | | |
712 | | - | |
| 732 | + | |
713 | 733 | | |
714 | 734 | | |
| 735 | + | |
715 | 736 | | |
716 | 737 | | |
717 | 738 | | |
718 | 739 | | |
719 | 740 | | |
720 | | - | |
| 741 | + | |
721 | 742 | | |
722 | 743 | | |
723 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
724 | 747 | | |
725 | 748 | | |
726 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| |||
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
402 | | - | |
| 405 | + | |
403 | 406 | | |
404 | | - | |
| 407 | + | |
405 | 408 | | |
406 | 409 | | |
407 | 410 | | |
| |||
0 commit comments