Skip to content

mysqldump converts times to UTC by default #100

Description

@aaust

The creation time of CCDB entries is shifted by 4h when comparing the mysql database and an sqlite file. Here is an example from the mysql database:

ccdb ls FDC/package1/wire_timing_offsets
/FDC/package1/wire_timing_offsets
(ID)     (created)              (user)           (variation)     (run range)      (comments)
 651588  2024-10-04 14-57-10    aaustreg         default         121207-121207   

And the same example from the sqlite file in /work/halld2/home/gxproj5/sqlite/ccdb_monitoring_launch.sqlite, create by this command:

mysqldump -u ccdb_user -h hallddb.jlab.org ccdb > dump.mysql.sql
$CCDB_HOME/scripts/mysql2sqlite/mysql2sqlite dump.mysql.sql | sqlite3 ccdb.sqlite
ccdb ls FDC/package1/wire_timing_offsets
/FDC/package1/wire_timing_offsets
(ID)     (created)              (user)           (variation)     (run range)      (comments)
 651588  2024-10-04 18-57-10    aaustreg         default         121207-121207

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