Another daylight saving issue

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Posts: 491
Joined: Thu Jul 27, 2006 11:58 am

Re: Another daylight saving issue

Post by mikeb » Tue Aug 28, 2018 9:28 am

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 =;
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!

Post Reply