[ https://issues.apache.org/jira/browse/CASSANDRA-6973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982806#comment-13982806 ]
Chander S Pechetty edited comment on CASSANDRA-6973 at 4/28/14 7:22 AM: ------------------------------------------------------------------------ The letter "X" is used to specify ISO 8601 time zone from the [SimpleDateFormat|http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#iso8601timezone] javadocs. The pattern letter 'X' was added in JDK 7 for supporting ISO8601 style time zone format. Replaced the TimestampSerializer ISO8601 pattern 'Z' with 'X', and added support for missing patterns. <time>Z <time>±hh:mm <time>±hhmm <time>±hh This patch by no means covers all the ISO 8601 combinations, but supplements the most frequently used patterns specified in the TimestampSerializer class. was (Author: chander): The letter "X" is used to specify ISO 8601 time zone from the [SimpleDateFormat|http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#iso8601timezone] javadocs. The pattern letter 'X' was added in JDK 7 for supporting ISO8601 style time zone format. Replaced the TimestampSerializer ISO8601 pattern 'Z' with 'X', and added support for missing patterns. {code borderStyle=solid} <time>Z <time>±hh:mm <time>±hhmm <time>±hh {code} This patch by no means covers all the ISO 8601 combinations, but supplements the most frequently used patterns specified in the TimestampSerializer class. > 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 S Pechetty > Priority: Trivial > Attachments: trunk-6973.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.2#6252)