#7176 Fixed bug in DateTimeExtensions