From 36b183f80425bbb2b2416bc66cf36f0a25bfa626 Mon Sep 17 00:00:00 2001 From: Aleksey Yeschenko Date: Mon, 10 Dec 2012 18:13:13 +0300 Subject: [PATCH] cqlsh: fix timestamp formatting on some platforms; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5046 --- CHANGES.txt | 1 + bin/cqlsh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 15d63f0b43..43fe18824a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,7 @@ * Improve schema propagation performance (CASSANDRA-5025) * Fall back to old describe_splits if d_s_ex is not available (CASSANDRA-4803) * Improve error reporting when streaming ranges fail (CASSANDRA-5009) + * cqlsh: fix timestamp formatting on some platforms (CASSANDRA-5046) 1.1.7 diff --git a/bin/cqlsh b/bin/cqlsh index ac9e167aa5..967f2f12db 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -495,7 +495,7 @@ def format_value(val, casstype, output_encoding, addcolor=False, time_format='', offset = -time.altzone else: offset = -time.timezone - if formatted[-4] != '0000' or time_format[-2] != '%z' or offset == 0: + if formatted[-4:] != '0000' or time_format[-2:] != '%z' or offset == 0: bval = formatted else: # deal with %z on platforms where it isn't supported. see CASSANDRA-4746.