forcedotcom / phoenix

BSD 3-Clause "New" or "Revised" License
558 stars 227 forks source link

CEIL function may produce incorrect results for TIMESTAMP #656

Open jtaylor-sfdc opened 10 years ago

jtaylor-sfdc commented 10 years ago

In the CEIL function, we only consider nanos when the time unit of MILLISECONDS is used. However, we should consider it for other time units as well. For example, if the time unit is SECONDS and the TIMESTAMP value happens to be at an exact multiple of 1000 milliseconds, then the CEIL should round up, as their will be nano seconds remaining and thus the TIMESTAMP should be rounded up to the next increment.