cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CASSANDRA-4437) cqlsh displays bad timezone for timestamp types
Date Mon, 11 Mar 2013 04:11:12 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-4437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aleksey Yeschenko resolved CASSANDRA-4437.
------------------------------------------

    Resolution: Duplicate
    
> 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 the time received
from thrift into your local timezone but does not fill in the timezone info, so when it is
printed with time.strftime, it always appears with an hour in your timezone with +0000 as
the timezone which is wrong.
> Example:
> cqlsh:ecourreges> UPDATE syndic set emails=11, unreadmails=3, nextuid=16, endwnd='2012-07-14
21:15:00+0000', endsub='2012-07-14 21:15:00+0000' where ise='ise1';
> cqlsh:ecourreges> select * from syndic;
>  ise  | alllastdetails | allmaildetails | emails | endsub                   | endwnd
                  | lastdetails | lastnotif | maildetails | nextuid | unreadmails
> ------+----------------+----------------+--------+--------------------------+--------------------------+-------------+-----------+-------------+---------+-------------
>  ise1 |           null |           null |     11 | 2012-07-14 23:15:00+0000 | 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+0200' but not
'2012-07-14 23:15:00+0000' !!!
> I see 2 ways of fixing it:
> cqlsh line 474: replace timestamp = time.localtime(val) with timestamp = time.gmtime(val)
> or handle the timezone properly by using something else than localtime+strftime, but
the question is what?
> Good luck and keep up the great work!
> Regards,
> Emmanuel Courrèges.
> Alten Consultant for Orange Portal France.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message