<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/time_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,23 +1,36 @@
+ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
+
 module CassandraObject
   class Attribute
     FORMATS = {}
-    FORMATS[Date] = /^\d{4}\/\d{2}\/\d{2}$/
+    FORMATS[Date]    = /^\d{4}\/\d{2}\/\d{2}$/
     FORMATS[Integer] = /^-?\d+$/
     FORMATS[Float]   = /^-?\d*\.\d*$/
-    
+    FORMATS[Time]    = /\A\s*
+              -?\d+-\d\d-\d\d
+              T
+              \d\d:\d\d:\d\d
+              (\.\d*)?
+              (Z|[+-]\d\d:\d\d)?
+              \s*\z/ix # lifted from the implementation of Time.xmlschema
+
     CONVERTERS = {}
     CONVERTERS[Date] = Proc.new do |str|
       Date.strptime(str, &quot;%Y/%m/%d&quot;)
     end
-    
+
     CONVERTERS[Integer] = Proc.new do |str|
       Integer(str)
     end
-    
+
     CONVERTERS[Float] = Proc.new do |str|
       Float(str)
     end
-    
+
+    CONVERTERS[Time] = Proc.new do |str|
+      Time.xmlschema(str)
+    end
+
     attr_reader :name
     def initialize(name, owner_class, options)
       @name = name.to_s
@@ -27,7 +40,7 @@ module CassandraObject
       append_validations!
       define_methods!
     end
-  
+
     # I think this should live somewhere in Amo
     def check_value!(value)
       # Allow nil and Strings to fall back on the validations for typecasting
@@ -42,11 +55,11 @@ module CassandraObject
         raise TypeError, &quot;Expected #{expected_type.inspect} but got #{value.inspect}&quot;
       end
     end
-  
+
     def expected_type
       @options[:type] || String
     end
-    
+
     def type_cast(value)
       if value.is_a?(expected_type)
         value
@@ -56,7 +69,7 @@ module CassandraObject
         value
       end
     end
-    
+
     def append_validations!
       if f = FORMATS[expected_type]
         @owner_class.validates_format_of @name, :with =&gt; f, :unless =&gt; lambda {|obj| obj.send(name).is_a? expected_type }, :allow_nil =&gt; @options[:allow_nil]</diff>
      <filename>lib/cassandra_object/attributes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module CassandraObject
   module Persistence
     extend ActiveSupport::Concern
-    
+
     module ClassMethods
       def get(key, options = {})
         multi_get([key], options).values.first
@@ -71,7 +71,7 @@ module CassandraObject
           memo
         end
       end
-      
+
       def decode_columns_hash(attributes)
         attributes.inject(Hash.new) do |memo, (column_name, value)|
           memo[column_name.to_s] = ActiveSupport::JSON.decode(value)
@@ -79,7 +79,7 @@ module CassandraObject
         end
       end
     end
-    
+
     module InstanceMethods
       def save
         if was_new_record = new_record?</diff>
      <filename>lib/cassandra_object/persistence.rb</filename>
    </modified>
    <modified>
      <diff>@@ -57,3 +57,11 @@ class Person &lt; CassandraObject::Base
   attribute :name, :type =&gt; String
   attribute :age,  :type =&gt; Integer
 end
+
+class Appointment &lt; CassandraObject::Base
+  attribute :title,      :type =&gt; String
+  attribute :start_time, :type =&gt; Time
+  attribute :end_time,   :type =&gt; Time, :allow_nil =&gt; true
+  
+  key :natural, :attributes =&gt; :title
+end
\ No newline at end of file</diff>
      <filename>test/fixture_models.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>35df082427808ae631dd4063a79a65c0cda803af</id>
    </parent>
    <parent>
      <id>cbe42c778c5f211189f5866abb6f0e8b8144a28c</id>
    </parent>
  </parents>
  <author>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </author>
  <url>http://github.com/NZKoz/cassandra_object/commit/dc9dcbaf78d916c1a7132b87c5031632bfaaf3e6</url>
  <id>dc9dcbaf78d916c1a7132b87c5031632bfaaf3e6</id>
  <committed-date>2009-11-04T16:47:24-08:00</committed-date>
  <authored-date>2009-11-04T16:47:24-08:00</authored-date>
  <message>Merge commit 'rk/master'</message>
  <tree>26aaf089774133ce12cdc3f9cf9ee12b2ab0da1b</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
