Describe the bug, including details regarding any error messages, version, and platform.
When function TO_DATE is called with pattern 'YYYY-MM' it will return date which has -1 day offset to expected. For example to_date('2022-11', 'YYYY-MM') will return 1667174400000 which is 2022-10-31. Problem is caused by strptime returning 0 in result.tm_mday if day is not part of format. This will cause result to be -1 day from expected.
Component(s)
C++, C++ - Gandiva