)]}'
{
  "commit": "ce236336c8416fcdb47975dfebbeb5d9a40c609d",
  "tree": "2027eebc9f1696e265fd6d968aec9cb08bba2435",
  "parents": [
    "2e24ea4ffce680986316c4ea070e297af8c37cd5"
  ],
  "author": {
    "name": "Tomasz Kamiński",
    "email": "tkaminsk@redhat.com",
    "time": "Mon Jul 20 09:15:28 2026 +0200"
  },
  "committer": {
    "name": "Tomasz Kamiński",
    "email": "tkaminsk@redhat.com",
    "time": "Mon Jul 20 11:39:50 2026 +0200"
  },
  "message": "libstdc++: Implement zic writezone merge optimization [PR124854]\n\nWhen two adjacent Zone lines have different total offsets and the\nnew line\u0027s rule set has a rule firing within jump of the boundary\n(where jump \u003d old_total - new_total \u003e 0, i.e. local time goes\nbackward at the boundary), zic folds that rule into the boundary\nitself: the single transition emitted has the rule\u0027s save value\nalready applied, so the new line begins with the post-rule save\nrather than briefly using the pre-rule save and then transitioning\nagain moments later.\n\nCanonical examples handled by the new merge block:\n* America/Argentina/Buenos_Aires 1999-10-03: lines change\n  stdoff -3 → -4 with an Argentina DST rule firing on the same\n  day. Without the merge, chrono emits a 1-hour stretch of\n  offset\u003d-4 save\u003d0 and then transitions to offset\u003d-3 save\u003d1;\n  with the merge, the boundary itself is at offset\u003d-3 save\u003d1.\n* Europe/Berlin 1945-05-24: lines split a rule set, with the\n  So 1945-May-24 rule (save\u003d2, \"CEMT\") firing at 01:00 UTC in\n  the new frame, inside the 1h backward window.\n\nSimilarly, when the zone expansion algorithm is resumed after DST\nspan (save \u003d 1h), we will revisit the corresponding STD transition,\nfor example: given offset +2h, the transition happening at 12:00\nlocal time, will be considered twice:\n * 09:00 UT (2h + 1h) - proper ending of DST span\n * 10:00 UT (2h) - after re-entry.\nPreviously this transition were rejected using the (now removed)\nrule_start - t \u003c days(1) check, preventing us from emitting the one\nhour STD time range followed by rest of same range. In this patch,\nwe reuse same merge logic, as such STD transition happens during\nbackward jump from boundary introduced by previous expansion.\n\nThis patch address both of the above by computing length of the\nbackward jump (merge_window) at the start of the expansion (regardless\nif initial or re-entry), and then considering initial rule transition\nhappening in [info.begin + merge_window] to apply at info.begin.\n\nlibstdc++-v3/ChangeLog:\n\n\tPR libstdc++/124854\n\t* src/c++20/tzdb.cc (ZoneInfo::save): Define.\n\t(time_zone::_M_get_sys_info): Fold initial transition if they\n\toccurs in duplicated local time window (merge_window) due move\n\tfrom DST to STD zone.\n\t* testsuite/std/time/time_zone/wall_cascade.cc (test_next_year):\n\tTest that 1945 Pacific/Auckland transition is properly handled.\n\t(test_negative): Adjust test to avoid zone merge.\n\t* testsuite/std/time/time_zone/zone_merge.cc: New test.\n\nReviewed-by: Jonathan Wakely \u003cjwakely@redhat.com\u003e\nCo-authored-by: Álvaro Begué \u003calvaro.begue@gmail.com\u003e\nSigned-off-by: Álvaro Begué \u003calvaro.begue@gmail.com\u003e\nSigned-off-by: Tomasz Kamiński \u003ctkaminsk@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "43f6a0dbb846bf6c8c7f2a038ec3a5bf04e006b5",
      "old_mode": 33188,
      "old_path": "libstdc++-v3/src/c++20/tzdb.cc",
      "new_id": "6fe3c6cfee64bcc55cf2f0a03e415a0034c980cf",
      "new_mode": 33188,
      "new_path": "libstdc++-v3/src/c++20/tzdb.cc"
    },
    {
      "type": "modify",
      "old_id": "f9167b79612d5d20fb074f619e544e23f1adf115",
      "old_mode": 33188,
      "old_path": "libstdc++-v3/testsuite/std/time/time_zone/wall_cascade.cc",
      "new_id": "fcce1937ea626458eb134892205e62d82eb92f0a",
      "new_mode": 33188,
      "new_path": "libstdc++-v3/testsuite/std/time/time_zone/wall_cascade.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "75942f976b6e75cce9936cd115cdc49607e611fd",
      "new_mode": 33188,
      "new_path": "libstdc++-v3/testsuite/std/time/time_zone/zone_merge.cc"
    }
  ]
}
