Ignore:
Timestamp:
07/21/21 22:41:46 (12 months ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
29af341
Parents:
0b4a1d0
Message:

Parse and store utc_offset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r0b4a1d0 r8d47489  
    150150    if (insert) { // insert conference
    151151        query.prepare("INSERT INTO CONFERENCE (title,url,subtitle,venue,city,start,end,"
    152                                                 "day_change,timeslot_duration,active) "
     152                                                "day_change,timeslot_duration,utc_offset,display_time_shift,active) "
    153153                        " VALUES (:title,:url,:subtitle,:venue,:city,:start,:end,"
    154                                                 ":day_change,:timeslot_duration,:active)");
     154                                                ":day_change,:timeslot_duration,:utc_offset,:display_time_shift,:active)");
    155155    } else { // update conference
    156156        query.prepare("UPDATE CONFERENCE set title=:title, url=:url, subtitle=:subtitle, venue=:venue, city=:city, start=:start, end=:end,"
    157                                             "day_change=:day_change, timeslot_duration=:timeslot_duration, active=:active "
     157                                            "day_change=:day_change, timeslot_duration=:timeslot_duration, utc_offset=:utc_offset, display_time_shift=:display_time_shift, active=:active "
    158158                      "WHERE id=:id");
    159159    }
     
    166166    query.bindValue(":day_change", QTime(0, 0).secsTo(dayChange));
    167167    query.bindValue(":timeslot_duration", -QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
     168    QVariant utc_offset;
     169    if (!aConference.value("utc_offset").isEmpty()) utc_offset = aConference["utc_offset"].toInt();
     170    query.bindValue(":utc_offset", utc_offset);
     171    QVariant display_time_shift;
     172    if (!aConference.value("display_time_shift").isEmpty()) display_time_shift = aConference["display_time_shift"].toInt();
     173    query.bindValue(":display_time_shift", display_time_shift);
    168174    query.bindValue(":active", 1);
    169175    if (!insert) query.bindValue(":id", conferenceId);
Note: See TracChangeset for help on using the changeset viewer.