select distinct batch_id from sms where status='0' and now() between timing and timing+(timeout || 'sec')::INTERVAL
猜測問題在這,查了下發現JVM啟動時讀區的時區檔案與系統的不一致,再看看主機的/etc/localtime竟指向了紐約:lrwxrwxrwx. 1 root root 38 Nov 17 2020 /etc/localtime -> ../usr/share/zoneinfo/America/New_York
按照https://www.cnblogs.com/krock/p/15476405.html的方法,修改時區檔案(ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime)後應用正常。