cqlsh: fix timestamp formatting on some platforms;

patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5046
This commit is contained in:
Aleksey Yeschenko 2012-12-10 18:13:13 +03:00
parent 6b8a0d9f15
commit 36b183f804
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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.