[4/4] git commit: cqlsh: fix timestamp formatting on some platforms; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5046

2012-12-10 Thread aleksey
cqlsh: fix timestamp formatting on some platforms;
patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5046


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36b183f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36b183f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36b183f8

Branch: refs/heads/trunk
Commit: 36b183f80425bbb2b2416bc66cf36f0a25bfa626
Parents: 6b8a0d9
Author: Aleksey Yeschenko 
Authored: Mon Dec 10 18:13:13 2012 +0300
Committer: Aleksey Yeschenko 
Committed: Mon Dec 10 18:13:13 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 15d63f0..43fe188 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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index ac9e167..967f2f1 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] != '' or time_format[-2] != '%z' or offset == 0:
+if formatted[-4:] != '' or time_format[-2:] != '%z' or offset == 0:
 bval = formatted
 else:
 # deal with %z on platforms where it isn't supported. see 
CASSANDRA-4746.



[3/3] git commit: cqlsh: fix timestamp formatting on some platforms; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5046

2012-12-10 Thread aleksey
cqlsh: fix timestamp formatting on some platforms;
patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5046


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36b183f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36b183f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36b183f8

Branch: refs/heads/cassandra-1.2
Commit: 36b183f80425bbb2b2416bc66cf36f0a25bfa626
Parents: 6b8a0d9
Author: Aleksey Yeschenko 
Authored: Mon Dec 10 18:13:13 2012 +0300
Committer: Aleksey Yeschenko 
Committed: Mon Dec 10 18:13:13 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 15d63f0..43fe188 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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index ac9e167..967f2f1 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] != '' or time_format[-2] != '%z' or offset == 0:
+if formatted[-4:] != '' or time_format[-2:] != '%z' or offset == 0:
 bval = formatted
 else:
 # deal with %z on platforms where it isn't supported. see 
CASSANDRA-4746.



[2/2] git commit: cqlsh: fix timestamp formatting on some platforms; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5046

2012-12-10 Thread aleksey
cqlsh: fix timestamp formatting on some platforms;
patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5046


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36b183f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36b183f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36b183f8

Branch: refs/heads/cassandra-1.2.0
Commit: 36b183f80425bbb2b2416bc66cf36f0a25bfa626
Parents: 6b8a0d9
Author: Aleksey Yeschenko 
Authored: Mon Dec 10 18:13:13 2012 +0300
Committer: Aleksey Yeschenko 
Committed: Mon Dec 10 18:13:13 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 15d63f0..43fe188 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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index ac9e167..967f2f1 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] != '' or time_format[-2] != '%z' or offset == 0:
+if formatted[-4:] != '' or time_format[-2:] != '%z' or offset == 0:
 bval = formatted
 else:
 # deal with %z on platforms where it isn't supported. see 
CASSANDRA-4746.



git commit: cqlsh: fix timestamp formatting on some platforms; patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for CASSANDRA-5046

2012-12-10 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.1 6b8a0d9f1 -> 36b183f80


cqlsh: fix timestamp formatting on some platforms;
patch by Aleksey Yeschenko, reviewed by Jonathan Ellis for
CASSANDRA-5046


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/36b183f8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/36b183f8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/36b183f8

Branch: refs/heads/cassandra-1.1
Commit: 36b183f80425bbb2b2416bc66cf36f0a25bfa626
Parents: 6b8a0d9
Author: Aleksey Yeschenko 
Authored: Mon Dec 10 18:13:13 2012 +0300
Committer: Aleksey Yeschenko 
Committed: Mon Dec 10 18:13:13 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 15d63f0..43fe188 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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/36b183f8/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index ac9e167..967f2f1 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] != '' or time_format[-2] != '%z' or offset == 0:
+if formatted[-4:] != '' or time_format[-2:] != '%z' or offset == 0:
 bval = formatted
 else:
 # deal with %z on platforms where it isn't supported. see 
CASSANDRA-4746.