mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
fix formatDateTimeInJodaSyntax
This commit is contained in:
parent
d816f38d77
commit
81096b91b5
@ -245,16 +245,17 @@ private:
|
||||
}
|
||||
|
||||
/// Digits
|
||||
size_t digits_written = 0;
|
||||
while (w >= 100)
|
||||
{
|
||||
w /= 100;
|
||||
|
||||
writeNumber2(dest + pos, n / w);
|
||||
pos += 2;
|
||||
|
||||
digits_written += 2;
|
||||
n = n % w;
|
||||
}
|
||||
if (n)
|
||||
if (digits_written != digits)
|
||||
{
|
||||
dest[pos] = '0' + n;
|
||||
++pos;
|
||||
|
@ -0,0 +1,3 @@
|
||||
150
|
||||
110
|
||||
300
|
@ -0,0 +1,5 @@
|
||||
select formatDateTimeInJodaSyntax(toDate32('2012-05-29'), 'D');
|
||||
select formatDateTimeInJodaSyntax(toDate32('2012-04-19'), 'D');
|
||||
select formatDateTimeInJodaSyntax(toDate32('2010-10-27 13:41:27.0'), 'D');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user