Is there a way to represent a time in ruby without having a Date attached? I am doing a timetracking application and I only need in/out times, there is a separate column for date.
The MySQL TIME data type stores only the time, but in Rails it comes back as Jan 1 2000 + what ever time is there.
Should i just ignore the date part, or is there a way to eliminate it?
There's no way to eliminate it, because:
Just format it like this:
We just store times with no attached dates as minutes since midnight in an integer column (that's Postgres not MySQL but nonetheless). Maybe that approach can work for you too?