Skip to content

fix: TIMESTAMP/TIMESTAMP_TZ semantics (engine PR #723 covers this)#44

Closed
adsharma wants to merge 4 commits into
mainfrom
fix/timestamp-tz
Closed

fix: TIMESTAMP/TIMESTAMP_TZ semantics (engine PR #723 covers this)#44
adsharma wants to merge 4 commits into
mainfrom
fix/timestamp-tz

Conversation

@adsharma

@adsharma adsharma commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This PR has been reverted to empty — the interval fix requires the engine change to be merged first. The TIMESTAMP/TIMESTAMP_TZ semantics fix is in LadybugDB/ladybug#723.

… conversion

PyQueryResult::convertValueToPyObject (pybind path) and all interval
conversion sites in _lbug_capi.py (C-API path) now use
  days = years * 365 + months * 30 + days
instead of
  days = months * 30 + days

This gives 365 days per whole year instead of 360, matching the
engine's Interval::DAYS_PER_YEAR constant.
adsharma added 3 commits July 22, 2026 09:36
Interval months-to-days conversion now uses DAYS_PER_YEAR (365) for
whole years instead of DAYS_PER_MONTH * 12 (360). Updated all test
assertions:

  3 years 2 days 13:02:00  -> 1097 days (was 1082)
  10 years 5 months 13h    -> 3800 days (was 3750)
  26 years 52 days 48h     -> 9544 days (was 9414)
@adsharma adsharma changed the title fix: use DAYS_PER_YEAR (365) for whole years in interval-to-timedelta conversion fix: TIMESTAMP/TIMESTAMP_TZ semantics (engine PR #723 covers this) Jul 22, 2026
@adsharma

Copy link
Copy Markdown
Contributor Author

The TIMESTAMP/TIMESTAMP_TZ semantics fix is solely an engine change (LadybugDB/ladybug#723). The interval fix will be submitted separately once the engine change lands and a new prebuilt lib is available.

@adsharma adsharma closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant