-- select expires_tstamp,expires_tstamp-interval '1 seconds' as newtstamp from members where expires_tstamp - date_trunc( 'day' , expires_tstamp ) = '00:00:00';
update members set expires_tstamp=expires_tstamp-interval '1 seconds' where expires_tstamp - date_trunc( 'day' , expires_tstamp ) = '00:00:00';	-- update 00:00:00;
update members set expires_tstamp=date_trunc('day',expires_tstamp) + interval '1 days' - interval '1 seconds' where expires_tstamp - date_trunc( 'day' , expires_tstamp ) = '23:00:00'; -- update 23:00:00
update members set expires_tstamp=date_trunc('day',expires_tstamp) - interval '1 seconds' where expires_tstamp - date_trunc( 'day' , expires_tstamp ) in ('00:59:59','01:00:00'); -- update after midnight
update members set expires_tstamp=date_trunc('day',expires_tstamp) + interval '1 days' - interval '1 seconds' where expires_tstamp - date_trunc( 'day' , expires_tstamp ) not in ('23:59:59'); -- update 23:00:00

