Skip to content

Commit cd7fb4d

Browse files
committed
Backported fix for CORE-6494 - Inconsistent translation "string->timestamp->string->timestamp" in dialect 1.
1 parent 0f901d0 commit cd7fb4d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/cvt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,7 +1933,7 @@ static void datetime_to_text(const dsc* from, dsc* to, Callbacks* cb)
19331933
else
19341934
{
19351935
// Prior to BLR version 5 timestamps were converted to text in the dd-MMM-yyyy format
1936-
sprintf(p, "%d-%.3s-%d",
1936+
sprintf(p, "%2.2d-%.3s-%4.4d",
19371937
times.tm_mday,
19381938
FB_LONG_MONTHS_UPPER[times.tm_mon], times.tm_year + 1900);
19391939
}

src/isql/isql.epp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7413,13 +7413,13 @@ static unsigned print_item(TEXT** s, const IsqlVar* var, const unsigned length)
74137413
else
74147414
{
74157415
if (setValues.Time_display)
7416-
sprintf(d, "%2d-%s-%4d %2.2d:%2.2d:%2.2d.%4.4" ULONGFORMAT,
7416+
sprintf(d, "%2.2d-%s-%4.4d %2.2d:%2.2d:%2.2d.%4.4" ULONGFORMAT,
74177417
times.tm_mday, alpha_months[times.tm_mon],
74187418
times.tm_year + 1900, times.tm_hour, times.tm_min,
74197419
times.tm_sec,
74207420
((ULONG*) var->value.asChar)[1] % ISC_TIME_SECONDS_PRECISION);
74217421
else
7422-
sprintf(d, "%2d-%s-%4d", times.tm_mday,
7422+
sprintf(d, "%2.2d-%s-%4.4d", times.tm_mday,
74237423
alpha_months[times.tm_mon], times.tm_year + 1900);
74247424
}
74257425

0 commit comments

Comments
 (0)