https://peeterjoot.com/2018/11/08/phy2403-qft-i-momentum-of-scalar-field-time-dependent-terms/
PHY2403: QFT I: Momentum of scalar field: time dependent terms?