As a small optimalisation, for some applications it may also be acceptable to configure a timezone that applies to the whole database, and then to do everything else the author describes here.