Uploaded image for project: 'Instrument control development'
  1. Instrument control development
  2. INSTRM-2651

Examine use of time zone setting in database calls

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Won't Fix (View Workflow)
    • Priority: Normal
    • Resolution: Won't Fix
    • Component/s: ics_utils
    • Labels:
      None

      Description

      In the agActor there are a number of database calls where SET TIME ZONE 'UTC'; is prepended to the actual query of interest, and then individual columns are converted to HST within the sql statement. A few things should change with this:

      • The time zone should not be set on a per-call basis but instead set once at either a) the database role level, b) the database level or c) the connection level. I would imagine we want to set the entire database to UTC.
      • The column level conversions should not be done in SQL but should be done in the caller code on the returned results. This is more work.
      • The term HST should not be used, it should be Pacific/Honolulu. (IANA name).

      Note that the use of the SET TIME ZONE call prepended to sql statements will have problems with pgBouncer and affects our implementation of INSTRM-2614.

      I was only looking at the agActor, so other actors and code should also be checked.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wtgee Wilfred Gee
                Reporter:
                wtgee Wilfred Gee
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: