CLC-3579 Convert DateTimes to_time before using to_i, to work around Rai...

...ls to_i conversion bug

https://jira.ets.berkeley.edu/jira/browse/CLC-3579