# More Time Issues. Default won't go Null

**URL:** <https://www.ruby-forum.com/t/more-time-issues-default-wont-go-null/72529>\
**Category:** Rails\
**Created:** [October 17, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/more-time-issues-default-wont-go-null/72529 "2006-10-17T21:10:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sw0rdfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sw0rdfish](https://www.ruby-forum.com/u/sw0rdfish)\
**Post date:** [October 17, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/more-time-issues-default-wont-go-null/72529/1 "2006-10-17T21:10:16Z")

</div>

I’m wondering why the following parameters, which are entered using  
time\_select;

Parameters: {“performer\_calc\_sheet\_timelog”=\>{“meal\_end(1i)”=\>“2000”,  
“date(1i)”=\>“2006”, “arrive\_at\_home(1i)”=\>“2000”,  
“arrive\_at\_home(2i)”=\>“1”, “meal\_end(2i)”=\>“1”,  
“finish\_time(1i)”=\>“2000”, “date(2i)”=\>“10”, “arrive\_at\_home(3i)”=\>“1”,  
“finish\_time(2i)”=\>“1”, “meal\_end(3i)”=\>“1”, “date(3i)”=\>“17”,  
“finish\_time(3i)”=\>“1”, “meal\_end(4i)”=\>"", “meal\_start(1i)”=\>“2000”,  
“arrive\_at\_home(4i)”=\>"", “call\_time(1i)”=\>“2000”,  
“arrive\_at\_home(5i)”=\>"", “meal\_start(2i)”=\>“1”, “meal\_end(5i)”=\>"",  
“leave\_home(1i)”=\>“2000”, “finish\_time(4i)”=\>"",  
“arrive\_at\_location(1i)”=\>“2000”, “finish\_time(5i)”=\>"",  
“call\_time(2i)”=\>“1”, “leave\_location(1i)”=\>“2000”,  
“meal\_start(3i)”=\>“1”, “leave\_home(2i)”=\>“1”,  
“arrive\_at\_location(2i)”=\>“1”, “call\_time(3i)”=\>“1”,  
“leave\_location(2i)”=\>“1”, “meal\_start(4i)”=\>"", “leave\_home(3i)”=\>“1”,  
“meal\_start(5i)”=\>"", “leave\_home(4i)”=\>“02”,  
“leave\_location(3i)”=\>“1”, “call\_time(4i)”=\>"",  
“arrive\_at\_location(3i)”=\>“1”, “leave\_home(5i)”=\>“19”,  
“call\_time(5i)”=\>"", “leave\_location(4i)”=\>"",  
“arrive\_at\_location(4i)”=\>“00”, “leave\_location(5i)”=\>"",  
“arrive\_at\_location(5i)”=\>“00”}, “commit”=\>“ADD”,  
“action”=\>“insert\_performer\_calc\_sheet\_timelog”, “id”=\>“42”,  
“controller”=\>“calc\_sheet”}

Generates the following SQL statement when I do  
"PerformerCalcSheetTimelog.create(params[:performer\_calc\_sheet\_timelog])

INSERT INTO performer\_calc\_sheet\_timelogs (`leave_home`,  
`leave_location`, `arrive_at_home`, `date`,  
`calc_sheet_performer_line_id`, `arrive_at_location`, `call_time`,  
`finish_time`, `meal_end`, `position`, `meal_start`) VALUES(‘2000-01-01  
02:19:00’, ‘2000-01-01 00:00:00’, ‘2000-01-01 00:00:00’, ‘2006-10-17’,  
42, ‘2000-01-01 00:00:00’, ‘2000-01-01 00:00:00’, ‘2000-01-01  
00:00:00’, ‘2000-01-01 00:00:00’, 3, ‘2000-01-01 00:00:00’)

I have the database set to receive NULL as an entry for all the times,  
and if I input data using Navicat for example, they go in as NULL. The  
problem is the fields in mySQL are TIME fields, so when I retrieve the  
data, it can’t tell if it’s supposed to be Midnight ( 00:00:00 ) or  
nothing.

Any help would be MUCH appreciated, I’m going bananas. Thanks
