In most cases timezone is not persisted in db columns with type TIMESTAMP. It can lead to side-effects on some environments, for example :
- locale of server and db is GMT
- locale of batch is GMT-5. When it is executed at 08.00.00-0500, timezone of ISSUES.CREATED_AT is lost -> value is 08.00.00+0000
This behavior was verified on MSSQL 2008 and MySQL 5.6. Other databases were not tested.
It leads to unexpected behaviors, for example
SONAR-5049 or comparison of dates in the issues search form.
The solution is to store only UTC timestamps in database. A simple workaround for MySQL is to complelete JDBC URL with
. MSSQL requires to programmatically convert timestamps to UTC.