GitHub: Fix MySQL error 1292 when inserting date
When MySQL sql_mode is set to strict (STRICT_TRANS_TABLES or
STRICT_ALL_TABLES), the DB rejects the date insertions in ISO-8601
format (yyyy-mm-ddThh:ii-ssZ) as sent by GitHub with error "Incorrect
datetime value".

This commit converts the date to ISO-9075 format as accepted per MySQL
documentation [1]

[1] http://dev.mysql.com/doc/en/date-and-time-functions.html#function_get-format

Fixes #39
1 parent e740f4f commit 9b4b50c6a17ed2c78c9ce34d45bcc41c5967150f
@Damien Regad Damien Regad authored on 6 Dec 2012
Showing 1 changed file
View
SourceGithub/SourceGithub.php