Guten Tag glauber ribeiro,
am Mittwoch, 30. September 2020 um 20:01 schrieben Sie:
> Bugzilla seems to be assuming that the times in the database are on
> UTC, but they are on Chicago Time. So it converts from UTC to
> Chicago Time, by subtracting the proper offset.
Bugzilla does store UTC normally, so what it does is correct. You most
likely restored using wrong time zone settings in your client and have
wrong timestamps in the DB for old data now. That's why newly added
timestamps work.
In Postgres, Bugzilla uses "timestamp without time zone" for
timestamps, which means whoever creates rows needs to provide UTC on
itself! If you forwarded the local timestamps of your dump 1:1,
that's wrong and Bugzilla assumes it has stored UTC itself.
Not sure how MySQL handles this, but found the following. That is how
Postgres handles things using "timestamp with time zone".
> Internally a MySQL timestamp column is stored as UTC but when
> selecting a date MySQL will automatically convert it to the current
> session timezone.
> When storing a date in a timestamp, MySQL will assume that the date
> is in the current session timezone and convert it to UTC for
> storage.
https://stackoverflow.com/a/19075291/2055163
> What am i missing? I don't think there is a way to convert the
> times to UTC when dumping or load the MySQL data (but if there is
> and you know it, i would love to know).
You should be able to set the time zone per session, depending on how
MySQL works I guess to UTC during dumps and then import those new
timestamps. You should easily spot a difference if it works in your
dump and Bugzilla.
> SET time_zone = 'Europe/Helsinki';
> SET time_zone = "+00:00";
> SET @@session.time_zone = "+00:00";
https://stackoverflow.com/a/19069310/2055163
> Is there a Bugzilla
> parameter that i'm missing, which tells Bugzilla what time zone is
> used in the database?
Not that I'm aware of, because UTC is assumed. The only setting is per
user, but that would only cover your wrong timestamps.
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning E-Mail: Thorsten....@AM-SoFT.de
AM-SoFT IT-Systeme
http://www.AM-SoFT.de/
Telefon...........05151- 9468- 55
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow