Page 2 of 2

Re: Another daylight saving issue

Posted: Tue Aug 28, 2018 9:28 am
by mikeb
If you use TimeTrex for payroll, you will need to run this query as well to fix the pay stub dates:

Code: Select all

WITH pp_tz AS (
      (extract(TIMEZONE FROM pp.start_date :: TIMESTAMP AT TIME ZONE pps.time_zone) :: TEXT ||
       ' secs') :: INTERVAL AS utc_offset
    FROM pay_period AS pp
      LEFT JOIN pay_period_schedule AS pps ON (pp.pay_period_schedule_id =
UPDATE pay_stub
  start_date       = (pay_stub.start_date + pp_tz.utc_offset),
  end_date         = (pay_stub.end_date + pp_tz.utc_offset),
  transaction_date = (pay_stub.transaction_date + pp_tz.utc_offset)
FROM pp_tz
WHERE pay_period_id =;