fixed mysql date time error

added if check for mysql
Merge pull request #283 from edx-solutions/ziafazal/api-fix-bug-mysql-datetime-error

fixed mysql date time error and broken organization tests