web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Off-by-one error and UtcDateTime

Sasha Nazarov Profile Picture Sasha Nazarov 901
It looks like some developers think that DateTimeUtil::newDateTime(01\01\2006, 86400) will produce 01-01-2006 11:59:59 PM.

In fact, it will be 02-01-2006 12:00:00 AM.

Be careful when defining ranges for UtcDateTime fields.

This was originally posted here.

Comments

*This post is locked for comments