Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
A fix to remove timezone information from dates before inserting in the DB. #16
A fix to remove timezone information from dates before inserting in the DB.
Some DBs do not support timezones on dates (notably, MySQL). We therefore have to remove the timezone information before storing the value. This is not too bad as we convert to the default timezone in
I have tried to code this in a way that will be both backwards compatible (no
Of course, if the user changes the default timezone while there is data in the database, it will cause the dates in the database to skew. This is not ideal, but there is not much we can do about this apart from either forcing all dates to be stored in UTC, or putting a suitably large warning somewhere in the docs.
For my part, I wouldn't not mind forcing to UTC, but I am in the UK, so the impact of that for me is probably going to be less.