Project

General

Profile

Bug #8925

Datetime/DatetimeTZ literals

Added by Marian Edu about 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#1 Updated by Marian Edu about 2 years ago

When we use string literals for datetime/datetimetz initial values those gets converted to using the respective ctor's - which are dependent on session date format - instead of using the `fromLiteral` approach like for date/decimal.

In fact the code is there already in `literal.rules` only shadowed by the call to `is_type_pair` which makes it using the ctor instead. This might be there for a reason but, at least in case of literals used for initial values, the conversion is not following the 4GL behaviour, the string literal is not dependent on session date format and always expect the `MDY` format.

#3 Updated by Greg Shah about 2 years ago

I wonder if this is the same problem Ovidiu fixed recently for #8741. If so, the fixes would be picked up by a rebase of 6410b.

#4 Updated by Marian Edu about 2 years ago

Greg Shah wrote:

I wonder if this is the same problem Ovidiu fixed recently for #8741. If so, the fixes would be picked up by a rebase of 6410b.

I would say this one was the other way around, when adding a new field to the temp-table the initial value there seems to be dependent on the session date-format. For literal datetime/datetime-tz values this should always use the 'mdy' format.

Now, there is a change made by Constantin on trunk #078 that seems to refer to the same issue - not sure if we can just pick the changes from trunk for this specific rule but will give it a try and see how it goes.

Also available in: Atom PDF