[ 
https://issues.apache.org/jira/browse/CASSANDRA-6973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14607876#comment-14607876
 ] 

Tom Lin commented on CASSANDRA-6973:
------------------------------------

I'm seeing following error after upgrading to 2.0.9:

cqlsh:polaris> insert into some_cf (user_id, date) values ('test_user_id', 
'2015-12-12 23:59:59  UTC');
InvalidRequest: code=2200 [Invalid query] message="unable to coerce '2015-12-12 
23:59:59  UTC' to a  formatted date (long)"

Looks like the new code can't parse timestamp with timezone name. I'm not sure 
whether this is a bug or not, but the query used to work in all versions before 
2.0.9.


> timestamp data type does ISO 8601 formats with 'Z' as time zone.
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-6973
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6973
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Juho Mäkinen
>            Assignee: Chander Pechetty
>            Priority: Trivial
>             Fix For: 2.0.9
>
>         Attachments: trunk-6973.txt, trunk-6973_unittest.txt, 
> trunk-6973_unittest_v2.txt, trunk-6973_v2.txt
>
>
> The timestamp data type does not support format where time zone is specified 
> with 'Z' (as in zulu aka. UTC+0 aka +0000 time zone). Example:
> create table foo(ts timestamp primary key);
> insert into foo(ts) values('2014-04-01T20:17:35+0000'); -- this works
> cqlsh:test> insert into foo(ts) values('2014-04-01T20:17:35Z');
> Bad Request: unable to coerce '2014-04-01T20:17:35Z' to a  formatted date 
> (long)
> The example date was copied directly from ISO 8601 Wikipedia page. The 
> standard says that "If the time is in UTC, add a Z directly after the time 
> without a space. Z is the zone designator for the zero UTC offset."
> Tested with cqlsh with 2.0.6 version.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to