demarches-normaliennes/app
simon lehericey 3685c65fb7 [fix #2905] fix DATE_TRUNC usage
DATE_TRUNC is played on the db where the timestamp are stored in utc.
So if a user search for 12/12/2012 in Paris timezone and that we truncate it should do something similar to :

SELECT DATE_TRUNC('day', foo.timezone) from (SELECT timestamp '2012-12-12 00:00:00' AT TIME ZONE 'Europe/Paris') as foo;
=> 2012-12-11

To avoid such pb, I suggest avoiding DATE_TRUNC when exact results are needed
2018-10-26 10:10:20 +00:00
..
assets Add carte type de champ options 2018-10-23 09:35:25 +02:00
controllers Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
dashboards Show the service, not the organisation in Procedures list 2018-10-11 14:13:43 +02:00
decorators remove localtime as it uses server timezone 2018-10-26 10:10:20 +00:00
facades Remove InviteDossierFacades 2018-10-10 09:36:05 +02:00
fields Add mail templates to manager 2018-10-02 17:27:28 +02:00
helpers remove localtime as it uses server timezone 2018-10-26 10:10:20 +00:00
javascript Add RPG carte source 2018-10-23 18:13:44 +02:00
jobs Time.now => Time.zone.now 2018-10-26 10:10:20 +00:00
lib Time.at => Time.zone.at 2018-10-26 10:10:20 +00:00
mailers [#2772] For unmigrated dossiers, make read-only access possible 2018-10-16 10:40:04 +02:00
models [fix #2905] fix DATE_TRUNC usage 2018-10-26 10:10:20 +00:00
serializers GeoArea on API expose fields per source type 2018-10-23 18:13:44 +02:00
services Add RPG carte source 2018-10-23 18:13:44 +02:00
uploaders Enable Style/WordArray 2018-10-03 12:03:21 +02:00
validators Do one thing per line 2018-10-01 16:15:46 +02:00
views remove localtime as it uses server timezone 2018-10-26 10:10:20 +00:00