#384 Export: SET time_zone = '+01:00';

3.6.4
closed-fixed
nobody
None
5
2014-02-22
2014-02-12
No

Adminer uses wrong timezones when exporting data. Numeric specification of timezone breaks TIMESTAMP columns. Correct value is for example 'Europe/Prague', never '+01:00'.

Discussion

  • Jakub Vrána

    Jakub Vrána - 2014-02-19

    The string time zones may not be available on the target server. Can you specify what do you mean by "breaks TIMESTAMP columns"? What happens to them?

     
  • Josef Kufner

    Josef Kufner - 2014-02-19

    In timezones with daylight saving the offset changes twice a year. When you specify time half of a year in future, you must convert it to another timezone. When timezone is specified using numeric offset, this does not happen. For example if you set alarm today (2014-02-14) to ring at 2014-06-01 12:00:00 and store it in TIMESTAMP column using "+01:00" timezone, it will ring at 2014-06-01 11:00:00, because in summer the timezone will be "+02:00". But if you store the same date in "Europe/Prague" timezone, it will be stored using "+02:00" offset (even if current offset is "+01:00") and alarm will ring at 12:00 as expected.

    If string timezones are not available, Adminer should consider the database server broken, switch to UTC and show big fat warning with link to manual.

     
  • Jakub Vrána

    Jakub Vrána - 2014-02-21
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2014-02-21

    I've solved it by setting the timezone to +00:00 both in the connection and in the dump.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks