Skip to content
This repository
Browse code

Fix support for subsecond time on the Time object for sqlite3

  • Loading branch information...
commit 52575b8d232a049b265446f2c08184df869c8d47 1 parent 6d4236f
John Van Enk authored February 12, 2014
2  data_objects/lib/data_objects/ext/do_common.c
@@ -193,7 +193,7 @@ VALUE data_objects_parse_date(const char *date) {
193 193
 }
194 194
 
195 195
 VALUE data_objects_parse_time(const char *date) {
196  
-  static char const* const _fmt_datetime = "%4d-%2d-%2d %2d:%2d:%2d%7lf";
  196
+  static char const* const _fmt_datetime = "%4d-%2d-%2d%*c%2d:%2d:%2d%7lf";
197 197
   int year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0, usec = 0;
198 198
   double subsec = 0;
199 199
 
1  do_sqlite3/spec/typecast/time_spec.rb
@@ -5,4 +5,5 @@
5 5
 
6 6
 describe 'DataObjects::Sqlite3 with Time' do
7 7
   it_should_behave_like 'supporting Time'
  8
+  it_should_behave_like 'supporting sub second Time'
8 9
 end

0 notes on commit 52575b8

Please sign in to comment.
Something went wrong with that request. Please try again.