demarches-normaliennes/spec
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
..
controllers [fix #2905] fix DATE_TRUNC usage 2018-10-26 10:10:20 +00:00
decorators Time.new => Time.zone.local 2018-10-26 10:10:20 +00:00
factories DateTime.now => Time.zone.now 2018-10-26 10:10:20 +00:00
features DateTime.parse => Time.zone.parse 2018-10-26 10:10:20 +00:00
fixtures Test ApiGeo RPGAdapter 2018-10-23 18:13:45 +02:00
helpers Time.local => Time.zone.local 2018-10-26 10:10:20 +00:00
jobs DateTime.new => Time.zone.local 2018-10-26 10:10:20 +00:00
lib Time.local => Time.zone.local 2018-10-26 10:10:20 +00:00
mailers DateTime.now => Time.zone.now 2018-10-26 10:10:20 +00: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 fix spec 2018-10-26 10:10:20 +00:00
support [Fix #2833] Move /support files to /fixtures 2018-10-16 10:47:41 +02:00
uploaders Conf: storage.apientreprise.fr -> static.demarches-simplifiees.fr 2018-10-25 17:05:22 +02:00
views [Fix #2880] Do not show our phone number to instructeurs 2018-10-18 18:38:04 +02:00
rails_helper.rb Bump development gems 2018-03-06 16:17:22 +01:00
spec_helper.rb Remove apipie (and maruku) 2018-10-09 17:23:07 +02:00