Skip to content

StartDateTime always in UTC while EndDateTime is in correct system timezone. #4807

@ricardo-buelna

Description

@ricardo-buelna

Describe Your Environment

  • Version of ZoneMinder = 1.38.1
  • How you installed ZoneMinder = Via RPM Fusion
  • Full name and version of OS = Rocky Linux 9

Describe the bug
StartDateTime in the MariaDB is being stored in UTC time while EndDateTime is being stored correctly in PDT.

For example:
MariaDB [zm]> select Name, StartDateTime, EndDateTime from Events limit 1;
+---------+---------------------+---------------------+
| Name | StartDateTime | EndDateTime |
+---------+---------------------+---------------------+
| Event-1 | 2026-05-06 15:43:33 | 2026-05-06 08:44:59 |
+---------+---------------------+---------------------+

Timezone is also incorrect on the zoneminder OSD.

There are no errors or warnings in the zoneminder logs.

Image

Expected behavior
StartDateTime and EndDateTime both stored as PDT.

Steps already taken with no result

  1. Ensured php.ini has the correct time zone and restarted, its set to "date.timezone = America/Los_Angeles"
  2. Updated time zone in ZM UI to not use system default and restarted ZoneMinder: Options -> System -> Timezone -> (GMT-07:00) America, Los Angeles
  3. Ensured Locale default was set to en_US and that the locale exists on the system (locale -a), then restarted zoneminder, php-fpm, httpd.
  4. Installed mysql time zone data and manually set timezone in the DB then restarted server.
    MariaDB [(none)]> SELECT @@global.time_zone, @@session.time_zone;
    +---------------------+---------------------+
    | @@global.time_zone | @@session.time_zone |
    +---------------------+---------------------+
    | America/Los_Angeles | America/Los_Angeles |
    +---------------------+---------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions