I have two columns representing a date and a time.
{dateproc: '2012-03-23', horproc: '2000-01-01 16:15:23 UTC'}
Both are read as a TimeWithZone
by Rails. I need to combine them.
This is what I've done. It works, but it doesn't feel elegant, and it just doesn't seem readable.
date_time_combined = dateproc + horproc.seconds_since_midnight.seconds
Any advice on improving it?
.seconds
call). What you have is pretty straightforward, even if it feels a little "blunt" \$\endgroup\$