| 87 | } |
| 88 | |
| 89 | void Validity::updateFormatString() |
| 90 | { |
| 91 | QString formatDate = tr("yyyy-MM-dd hh:mm"); |
| 92 | QString format; |
| 93 | |
| 94 | if (midnight) { |
| 95 | if (!endDate) |
| 96 | format = QTime(0,0,0).toString(formatDate); |
| 97 | else |
| 98 | format = QTime(23,59,59).toString(formatDate); |
| 99 | } else { |
| 100 | format = formatDate; |
| 101 | } |
| 102 | if (timeSpec() == Qt::UTC || midnight) { |
| 103 | format += " 'GMT'"; |
| 104 | } else { |
| 105 | format += QString(" '%1'") |
| 106 | .arg(QTime::currentTime().toString("t")); |
| 107 | } |
| 108 | setDisplayFormat(format); |
| 109 | } |
| 110 | |
| 111 | void Validity::setDate(const a1time &a) |
| 112 | { |