Skip to content

fix: stop converting timezone on TIMESTAMP (without TZ)#695

Open
adsharma wants to merge 1 commit into
mainfrom
fix/timestamp-interval-conversion
Open

fix: stop converting timezone on TIMESTAMP (without TZ)#695
adsharma wants to merge 1 commit into
mainfrom
fix/timestamp-interval-conversion

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Fixes: #694

  • Timestamp::tryConvertTimestamp no longer applies UTC offset when parsing a string with timezone info. The wall-clock time is preserved as-is, which is the correct semantics for TIMESTAMP (without TZ).
  • New Timestamp::tryConvertTimestampWithTZ applies the UTC offset, used by TIMESTAMP_TZ (and sub-second variants).
  • Interval::getMicro uses DAYS_PER_YEAR (365) for whole years instead of DAYS_PER_MONTH * 12 (360), matching the documented constants.

…_YEAR for whole years in interval

- Timestamp::tryConvertTimestamp no longer applies UTC offset when
  parsing a string with timezone info. The wall-clock time is preserved
  as-is, which is the correct semantics for TIMESTAMP (without TZ).
- New Timestamp::tryConvertTimestampWithTZ applies the UTC offset,
  used by TIMESTAMP_TZ (and sub-second variants).
- Interval::getMicro uses DAYS_PER_YEAR (365) for whole years instead
  of DAYS_PER_MONTH * 12 (360), matching the documented constants.
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.

Bug: Timestamp and Interval (date) datatypes are not intuitively correct!?

1 participant