We use a Vertica database with table columns of type timestamptz, all data is inserted in accordance with the UTC time zone. We use spring-jdbc NamedParameterJdbcTemplate
All requests are based on full calendar days, for example. the start date is 2013/08/01 and the end date is 2013/08/31, which brings everything between "2013/08/01 00: 00: 00.0000" and "2013/08/31 23: 59: 59.9999"
We are trying to modify our queries to consider time intervals, that is, I can for my local time zone, I can ask "2013/08/01 00: 00: 00.0000 Asia / Jerusalem" until "2013/08/31 23:59: 59.9999 Asia / Jerusalem ", which is clearly different from" 2013/08/01 00: 00: 00.0000 UTC 'to' 2013/08/31 23: 59: 59.9999 UTC '.
So far I canβt find a way to do this, I tried to set the time zone in the session:
set the time zone for Asia / Jerusalem;
This does not even work in my database client.
Computing the difference in our Java code will not work for us, since we also have queries that return date groups (this is completely confused).
Any ideas or recommendations?
source share