A quick fix would be to do the following:
func.current_timestamp().op('AT TIME ZONE')('UTC')
A more proper way is to use compiler extension and define custom compilation of CURRENT_TIMESTAMP
. Actually, there's already an example in its docs, which uses a different approach (TIMEZONE
function). Since you only need this for Postgres (I assume from your previous emails in SA mailing list that you're using Postgres), here's another (nicer) quick fix:
func.timezone('UTC', func.current_timestamp())
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…