Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE4C3DF0F for ; Sun, 9 Sep 2012 22:29:07 +0000 (UTC) Received: (qmail 83624 invoked by uid 500); 9 Sep 2012 22:29:07 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 83594 invoked by uid 500); 9 Sep 2012 22:29:07 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 83585 invoked by uid 99); 9 Sep 2012 22:29:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2012 22:29:07 +0000 Date: Mon, 10 Sep 2012 09:29:07 +1100 (NCT) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <985466141.56109.1347229747565.JavaMail.jiratomcat@arcas> In-Reply-To: <120161684.47165.1342166554793.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (CASSANDRA-4437) cqlsh displays bad timezone for timestamp types MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-4437?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-4437: -------------------------------------- Assignee: (was: paul cannon) Personally I'm fine with an "upgrade to a working Python" workaround, but i= f someone wants to patch it to format by hand instead that's okay. =20 > cqlsh displays bad timezone for timestamp types > ----------------------------------------------- > > Key: CASSANDRA-4437 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4437 > Project: Cassandra > Issue Type: Bug > Components: Tools > Affects Versions: 1.1.2 > Environment: Ubuntu 10.04 64bit > Reporter: Emmanuel Courreges > Priority: Minor > > cqlsh uses the time.localtime(epoch) function in python which converts th= e time received from thrift into your local timezone but does not fill in t= he timezone info, so when it is printed with time.strftime, it always appea= rs with an hour in your timezone with +0000 as the timezone which is wrong. > Example: > cqlsh:ecourreges> UPDATE syndic set emails=3D11, unreadmails=3D3, nextuid= =3D16, endwnd=3D'2012-07-14 21:15:00+0000', endsub=3D'2012-07-14 21:15:00+0= 000' where ise=3D'ise1'; > cqlsh:ecourreges> select * from syndic; > ise | alllastdetails | allmaildetails | emails | endsub = | endwnd | lastdetails | lastnotif | maildetails | nex= tuid | unreadmails > ------+----------------+----------------+--------+-----------------------= ---+--------------------------+-------------+-----------+-------------+----= -----+------------- > ise1 | null | null | 11 | 2012-07-14 23:15:00+00= 00 | 2012-07-14 23:15:00+0000 | null | null | null | = 16 | 3 > The output should be '2012-07-14 21:15:00+0000' or '2012-07-14 23:15:00+0= 200' but not '2012-07-14 23:15:00+0000' !!! > I see 2 ways of fixing it: > cqlsh line 474: replace timestamp =3D time.localtime(val) with timestamp = =3D time.gmtime(val) > or handle the timezone properly by using something else than localtime+st= rftime, but the question is what? > Good luck and keep up the great work! > Regards, > Emmanuel Courr=C3=A8ges. > Alten Consultant for Orange Portal France. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira