Commit 7e5fad90 authored by Jan Becker's avatar Jan Becker
Browse files

[gui] Add option to show time in local time zone

parent f7dbd73a
......@@ -1063,7 +1063,7 @@ QString Application::splashImagePath() const {
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ConnectionDialog* Application::cdlg() {
ConnectionDialog *Application::cdlg() {
createSettingsDialog();
return _dlgConnection;
}
......@@ -1075,6 +1075,8 @@ ConnectionDialog* Application::cdlg() {
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void Application::createSettingsDialog() {
if ( _dlgConnection ) return;
if ( type() == QApplication::Tty )
return;
_dlgConnection = new ConnectionDialog(&_connection, &_database);
_dlgConnection->setMessagingEnabled(isMessagingEnabled());
......@@ -1367,7 +1369,9 @@ void Application::destroyConnection() {
closeMessageThread();
cdlg()->setDefaultDatabaseParameters("","");
ConnectionDialog *dlg = cdlg();
if ( dlg != NULL )
dlg->setDefaultDatabaseParameters("","");
_connection = NULL;
emit changedConnection();
......
......@@ -249,7 +249,7 @@ class SC_GUI_API Application : public QApplication,
void startMessageThread();
void closeMessageThread();
void createSettingsDialog();
ConnectionDialog* cdlg();
ConnectionDialog *cdlg();
private:
......
......@@ -864,10 +864,6 @@ bool RecordView::feed(const Seiscomp::Record *rec) {
if ( _autoInsertItems ) {
child = addItem(streamID, stationCode);
if ( !child ) return false;
/*
std::cout << " starting at " << rec->startTime().toString("%F %T")
<< std::endl;
*/
emit addedItem(rec, child);
}
else
......
......@@ -21,6 +21,7 @@
#include <seiscomp3/math/math.h>
#include <seiscomp3/math/filter/butterworth.h>
#include <seiscomp3/gui/core/application.h>
#include <seiscomp3/gui/core/utils.h>
using namespace std;
using namespace Seiscomp;
......@@ -163,18 +164,8 @@ bool minmax(const ::RecordSequence *seq, const Core::TimeWindow &tw,
return sampleCount > 0;
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ostream &operator << (ostream &os, const Core::Time &t)
{
os << t.toString("%F %T.%f").substr(0,23);
return os;
}
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
......@@ -2968,7 +2959,7 @@ void RecordWidget::drawActiveCursor(QPainter &painter, int x, int y) {
f.setBold(false);
painter.setFont(f);
QString time = _cursorPos.toString("%T.%f000000").substr(0,11).c_str();
QString time = timeToString(_cursorPos, "%T.%f000000").mid(0,11);
painter.drawText(rect(), Qt::TextSingleLine | Qt::AlignRight | Qt::AlignTop, time);
}
......
......@@ -207,6 +207,7 @@ Scheme::Colors::Records::Records() {
alignment = Qt::red;
foreground = QColor(128, 128, 128);
alternateForeground = foreground;
spectrogram = Qt::black;
gaps = QColor(255, 255, 0, 64);
overlaps = QColor(255, 0, 255, 64);
}
......@@ -452,6 +453,15 @@ Scheme::Unit::Unit() {
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Scheme::DateTime::DateTime() {
useLocalTime = false;
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void Scheme::fetch() {
READ_BOOL(showMenu);
......@@ -479,6 +489,7 @@ void Scheme::fetch() {
READ_COLOR(colors.records.alignment);
READ_COLOR(colors.records.foreground);
READ_COLOR(colors.records.alternateForeground);
READ_COLOR(colors.records.spectrogram);
READ_COLOR(colors.records.gaps);
READ_COLOR(colors.records.overlaps);
READ_COLOR(colors.records.states.unrequested);
......@@ -604,6 +615,7 @@ void Scheme::fetch() {
READ_INT(precision.uncertainties);
READ_BOOL(unit.distanceInKM);
READ_BOOL(dateTime.useLocalTime);
}
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
......
......@@ -82,6 +82,7 @@ class SC_GUI_API Scheme {
QColor alignment;
QColor foreground;
QColor alternateForeground;
QColor spectrogram;
QColor gaps;
QColor overlaps;
RecordStates states;
......@@ -267,6 +268,12 @@ class SC_GUI_API Scheme {
bool distanceInKM;
};
struct DateTime {
DateTime();
bool useLocalTime;
};
public:
bool showMenu;
bool showStatusBar;
......@@ -279,6 +286,7 @@ class SC_GUI_API Scheme {
Map map;
Precision precision;
Unit unit;
DateTime dateTime;
Fonts fonts;
......
......@@ -22,6 +22,7 @@
#include <QResizeEvent>
#include "timescale.h"
#include "utils.h"
#include <seiscomp3/core/exceptions.h>
......@@ -142,7 +143,7 @@ bool TimeScale::getTickText(double pos, double lastPos,
Seiscomp::Core::Time time(pos);
if ( !time.valid() ) return false;
str = time.toString(_primaryTimeFormat).c_str();
str = timeToString(time, _primaryTimeFormat);
return true;
}
catch ( const Core::OverflowException&) { return false; }
......@@ -153,11 +154,11 @@ bool TimeScale::getTickText(double pos, double lastPos,
try {
Seiscomp::Core::Time time(pos);
if ( time.valid() ) {
std::string timeStr = time.toString(_secondaryTimeFormat);
QString timeStr = timeToString(time, _secondaryTimeFormat);
Seiscomp::Core::Time prevTime(lastPos);
if ( !prevTime.valid() ||
prevTime.toString(_secondaryTimeFormat) != timeStr ) {
str = timeStr.c_str();
timeToString(prevTime, _secondaryTimeFormat) != timeStr ) {
str = timeStr;
return true;
}
}
......
......@@ -14,6 +14,7 @@
#include <cstdio>
#include <cmath>
#include <seiscomp3/core/strings.h>
#include <seiscomp3/gui/core/application.h>
#include <seiscomp3/gui/core/utils.h>
#include <QEvent>
......@@ -151,6 +152,33 @@ QString depthToString(double depth, int precision) {
}
QString timeToString(const Core::Time &t, const char *fmt, bool addTimeZone) {
QString s;
if ( SCScheme.dateTime.useLocalTime ) {
s = t.toLocalTime().toString(fmt).c_str();
if ( addTimeZone ) {
s += " ";
s += Core::Time::LocalTimeZone().c_str();
}
}
else {
s = t.toString(fmt).c_str();
if ( addTimeZone )
s += " UTC";
}
return s;
}
void timeToLabel(QLabel *label, const Core::Time &t, const char *fmt, bool addTimeZone) {
if ( SCScheme.dateTime.useLocalTime )
label->setToolTip((t.toString(fmt) + " UTC").c_str());
label->setText(timeToString(t, fmt, addTimeZone));
}
QString elapsedTimeString(const Core::TimeSpan &dt) {
int d=0, h=0, m=0, s=0;
QLatin1Char fill('0');
......
......@@ -23,6 +23,9 @@
#include <vector>
class QLabel;
namespace Seiscomp {
namespace Gui {
......@@ -36,6 +39,8 @@ SC_GUI_API bool fromString(QColor& value, const std::string& str);
SC_GUI_API QString latitudeToString(double lat, bool withValue = true, bool withUnit = true, int precision = 2);
SC_GUI_API QString longitudeToString(double lon, bool withValue = true, bool withUnit = true, int precision = 2);
SC_GUI_API QString depthToString(double depth, int precision = 0);
SC_GUI_API QString timeToString(const Core::Time &t, const char *fmt, bool addTimeZone = false);
SC_GUI_API void timeToLabel(QLabel *label, const Core::Time &t, const char *fmt, bool addTimeZone = false);
SC_GUI_API QString elapsedTimeString(const Core::TimeSpan &dt);
SC_GUI_API void setMaxWidth(QWidget *w, int numCharacters);
......
......@@ -473,7 +473,7 @@ class AmplitudeViewMarker : public RecordMarker {
catch ( ... ) {}
try {
text += QString(" at %1").arg(_referencedAmplitude->creationInfo().creationTime().toString("%F %T").c_str());
text += QString(" at %1").arg(timeToString(_referencedAmplitude->creationInfo().creationTime(), "%F %T"));
}
catch ( ... ) {}
......
......@@ -1783,7 +1783,7 @@ void EventEdit::updateOriginRow(int row, Origin *org) {
QTreeWidgetItem *item = _originTree->topLevelItem(row);
item->setData(0, Qt::UserRole, QString(org->publicID().c_str()));
item->setText(_originColumnMap[OL_TIME], org->time().value().toString("%T").c_str());
item->setText(_originColumnMap[OL_TIME], timeToString(org->time().value(), "%T"));
item->setText(_originColumnMap[OL_LAT], QString("%1 %2").arg(fabs(org->latitude()), 0, 'f', SCScheme.precision.location).arg(org->latitude() < 0?"S":"N"));
item->setData(_originColumnMap[OL_LAT], Qt::UserRole, org->latitude().value());
item->setText(_originColumnMap[OL_LON], QString("%1 %2").arg(fabs(org->longitude()), 0, 'f', SCScheme.precision.location).arg(org->longitude() < 0?"W":"E"));
......@@ -1834,7 +1834,7 @@ void EventEdit::updateOriginRow(int row, Origin *org) {
item->setData(_originColumnMap[OL_RMS], Qt::UserRole, QVariant());
}
try {
item->setText(_originColumnMap[OL_CREATED], org->creationInfo().creationTime().toString("%F %T").c_str());
item->setText(_originColumnMap[OL_CREATED], timeToString(org->creationInfo().creationTime(), "%F %T"));
}
catch ( ... ) {
item->setText(_originColumnMap[OL_CREATED], "");
......@@ -1873,7 +1873,7 @@ void EventEdit::updateMagnitudeRow(int row, Magnitude *mag) {
item->setData(0, Qt::UserRole, QString(mag->publicID().c_str()));
try {
item->setText(MLC_TIMESTAMP, mag->creationInfo().creationTime().toString("%F %T").c_str());
item->setText(MLC_TIMESTAMP, timeToString(mag->creationInfo().creationTime(), "%F %T"));
}
catch ( ... ) {
item->setText(MLC_TIMESTAMP, "");
......@@ -1985,7 +1985,7 @@ void EventEdit::updateFMRow(int row, FocalMechanism *fm) {
}
try {
item->setText(_fmColumnMap[FML_CREATED], fm->creationInfo().creationTime().toString("%F %T").c_str());
item->setText(_fmColumnMap[FML_CREATED], timeToString(fm->creationInfo().creationTime(), "%F %T"));
}
catch ( ... ) {
item->setText(_fmColumnMap[FML_CREATED], "");
......@@ -2286,7 +2286,7 @@ bool EventEdit::sendJournal(const std::string &action,
void EventEdit::addJournal(JournalEntry *entry) {
QString created;
try {
created = entry->created().toString("%F %T").c_str();
created = timeToString(entry->created(), "%F %T");
}
catch ( ... ) {
created = "--/--/---- --:--:--";
......@@ -2439,7 +2439,7 @@ void EventEdit::updateEvent() {
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void EventEdit::updateOrigin() {
_ui.labelTimeValue->setText(_currentOrigin->time().value().toString("%F %T").c_str());
timeToLabel(_ui.labelTimeValue, _currentOrigin->time().value(), "%F %T");
_ui.labelLatitudeValue->setText(latitudeToString(_currentOrigin->latitude(), true, false, SCScheme.precision.location));
_ui.labelLatitudeUnit->setText(latitudeToString(_currentOrigin->latitude(), false, true));
......@@ -2611,7 +2611,7 @@ void EventEdit::updateMT() {
_ui.mtOriginInfo->setEnabled(true);
// time
_ui.mtOriginTime->setText(o->time().value().toString("%F %T").c_str());
timeToLabel(_ui.mtOriginTime, o->time().value(), "%F %T");
// region
Regions regions;
......
......@@ -815,7 +815,7 @@ class OriginTreeItem : public SchemeTreeItem {
setText(config.columnMap[COL_AGENCY], "");
setText(config.columnMap[COL_AUTHOR], "");
}
setText(config.columnMap[COL_OTIME], QString("%1").arg(ori->time().value().toString("... %T").c_str()));
setText(config.columnMap[COL_OTIME], timeToString(ori->time().value(), "... %T"));
setData(config.columnMap[COL_OTIME], Qt::UserRole, QVariant((double)ori->time().value()));
setText(config.columnMap[COL_M], "-"); // Mag
setText(config.columnMap[COL_MTYPE], "-"); // MagType
......@@ -888,7 +888,7 @@ class OriginTreeItem : public SchemeTreeItem {
}
}
setToolTip(config.columnMap[COL_OTIME], ori->time().value().toString("%F %T").c_str());
setToolTip(config.columnMap[COL_OTIME], timeToString(ori->time().value(), "%F %T", true));
setToolTip(config.columnMap[COL_ID], text(config.columnMap[COL_ID]));
setToolTip(config.columnMap[COL_REGION], text(config.columnMap[COL_REGION])); // Region ToolTip
}
......@@ -971,7 +971,7 @@ class FocalMechanismTreeItem : public SchemeTreeItem {
fmBaseOrg = Origin::Find(fm->triggeringOriginID());
if ( fmBaseOrg ) {
setText(config.columnMap[COL_OTIME], QString("%1").arg(fmBaseOrg->time().value().toString("... %T").c_str()));
setText(config.columnMap[COL_OTIME], timeToString(fmBaseOrg->time().value(), "... %T"));
setData(config.columnMap[COL_OTIME], Qt::UserRole, QVariant((double)fmBaseOrg->time().value()));
try {
......@@ -1420,7 +1420,7 @@ class EventTreeItem : public SchemeTreeItem {
}
int column = config.columnMap[COL_OTIME];
setText(column, QString("%1").arg(origin->time().value().toString("%F %T").c_str()));
setText(column, timeToString(origin->time().value(), "%F %T"));
setData(column, Qt::UserRole, QVariant((double)origin->time().value()));
double lat = origin->latitude();
......
......@@ -236,6 +236,7 @@ class EventSummaryMap : public MapWidget {
void EventSummary::init() {
_ui.setupUi(this);
_showComment = true;
_defaultEventRadius = 0.0;
_maxMinutesSecondDisplay = -1;
......@@ -260,6 +261,8 @@ void EventSummary::init() {
// Set the font sizes
setupFont(_ui.originTime, SCScheme.fonts.highlight);
_ui.originTime->setMinimumWidth(_ui.originTime->fontMetrics().width("9999-99-99 99:99:99 "));
setupFont(_ui.timeAgo, SCScheme.fonts.base);
//QColor highlightColor = Qt::red;
......@@ -724,7 +727,7 @@ void EventSummary::selectMagnitude(const std::string &type) {
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void EventSummary::updateOrigin() {
// Origin time
_ui.originTime->setText(_currentOrigin->time().value().toString("%F %T").c_str());
timeToLabel(_ui.originTime, _currentOrigin->time().value(), "%F %T");
// Depth
try {
......
......@@ -1642,7 +1642,7 @@ void EventSummaryView::setOrigin(Seiscomp::DataModel::Origin* origin) {
}
ui._lbOriginTime->setText(_currentOrigin->time().value().toString("%F %T UTC").c_str());
timeToLabel(ui._lbOriginTime, _currentOrigin->time().value(), "%F %T UTC");
try {
uiHypocenter._lbOriginStatus->setText(_currentOrigin->evaluationMode().toString());
......@@ -1808,7 +1808,7 @@ void EventSummaryView::setAutomaticOrigin(DataModel::Origin* origin) {
}
ui._lbOriginTimeAutomatic->setText(origin->time().value().toString("%F %T UTC").c_str());
timeToLabel(ui._lbOriginTimeAutomatic, origin->time().value(), "%F %T UTC");
try {
uiHypocenter._lbOriginStatusAutomatic->setText(origin->evaluationMode().toString());
......@@ -2283,37 +2283,37 @@ void EventSummaryView::deferredMapUpdate(){
void EventSummaryView::updateMap(bool realignView){
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
if ( !_currentOrigin->arrivalCount() && _reader )
_reader->loadArrivals(_currentOrigin.get());
if ( _currentOrigin && !_currentOrigin->arrivalCount() && _reader )
_reader->loadArrivals(_currentOrigin.get());
_map->setOrigin(_currentOrigin.get());
_map->setOrigin(_currentOrigin.get());
if ( realignView ) {
if ( _recenterMap ) {
double radius = 30;
try { radius = std::min(radius, _currentOrigin->quality().maximumDistance()+0.1); }
catch ( ... ) {}
_map->canvas().displayRect(QRectF(_currentOrigin->longitude()-radius, _currentOrigin->latitude()-radius, radius*2, radius*2));
}
else {
if ( !_map->canvas().isVisible(_currentOrigin->longitude(), _currentOrigin->latitude()) ) {
_map->canvas().setView(QPointF(_currentOrigin->longitude(), _currentOrigin->latitude()), _map->canvas().zoomLevel());
}
if ( _currentOrigin && realignView ) {
if ( _recenterMap ) {
double radius = 30;
try { radius = std::min(radius, _currentOrigin->quality().maximumDistance()+0.1); }
catch ( ... ) {}
_map->canvas().displayRect(QRectF(_currentOrigin->longitude()-radius, _currentOrigin->latitude()-radius, radius*2, radius*2));
}
else {
if ( !_map->canvas().isVisible(_currentOrigin->longitude(), _currentOrigin->latitude()) ) {
_map->canvas().setView(QPointF(_currentOrigin->longitude(), _currentOrigin->latitude()), _map->canvas().zoomLevel());
}
}
}
if ( _displayFocMechs ) {
if ( _currentFocalMechanism )
showFocalMechanism(_currentFocalMechanism.get(), -80, -80, palette().color(QPalette::WindowText));
if ( _displayFocMechs ) {
if ( _currentFocalMechanism )
showFocalMechanism(_currentFocalMechanism.get(), -80, -80, palette().color(QPalette::WindowText));
// Only show the last automatic solution if there is a preferred
// solution and if both are different
if ( _lastAutomaticFocalMechanism && _currentFocalMechanism &&
_lastAutomaticFocalMechanism != _currentFocalMechanism )
showFocalMechanism(_lastAutomaticFocalMechanism.get(), 80, -80, _automaticOriginEnabledColor);
}
// Only show the last automatic solution if there is a preferred
// solution and if both are different
if ( _lastAutomaticFocalMechanism && _currentFocalMechanism &&
_lastAutomaticFocalMechanism != _currentFocalMechanism )
showFocalMechanism(_lastAutomaticFocalMechanism.get(), 80, -80, _automaticOriginEnabledColor);
}
_map->update();
_map->update();
QApplication::restoreOverrideCursor();
}
......
......@@ -149,7 +149,7 @@ class OriginTreeItem : public SchemeTreeItem {
void update() {
Origin* origin = static_cast<Origin*>(object());
setText(0, QString("%1").arg(origin->publicID().c_str()));
setText(1, QString("%1").arg(origin->time().value().toString("%F %T").c_str()));
setText(1, QString("%1").arg(timeToString(origin->time().value(), "%F %T")));
//setText(2, QString("%1").arg(origin->arrivalCount()));
}
......
......@@ -71,6 +71,7 @@ OriginLocatorMap::OriginLocatorMap(Map::ImageTree* mapTree,
, _drawStations(false), _drawStationsLines(true)
, _interactive(true)
{
_originSymbol = NULL;
_lastSymbolSize = 0;
_waveformPropagation = false;
_enabledCreateOrigin = false;
......
......@@ -1052,6 +1052,12 @@ ArrivalModel::ArrivalModel(DataModel::Origin* origin, QObject *parent)
else
_header << QString("%1 (deg)").arg(EArrivalListColumnsNames::name(i));
}
else if ( i == TIME ) {
if ( SCScheme.dateTime.useLocalTime )
_header << QString("%1 (%2)").arg(EArrivalListColumnsNames::name(i)).arg(Core::Time::LocalTimeZone().c_str());
else
_header << QString("%1 (UTC)").arg(EArrivalListColumnsNames::name(i));
}
else
_header << EArrivalListColumnsNames::name(i);
......@@ -1145,7 +1151,7 @@ QVariant ArrivalModel::data(const QModelIndex &index, int role) const {
pick = Pick::Cast(PublicObject::Find(a->pickID()));
if ( pick ) {
try {
return QString(pick->creationInfo().creationTime().toString("%T.%1f").c_str());
return timeToString(pick->creationInfo().creationTime(), "%T.%1f");
}
catch ( ValueException& ) {}
}
......@@ -1224,7 +1230,7 @@ QVariant ArrivalModel::data(const QModelIndex &index, int role) const {
case TIME:
pick = Pick::Cast(PublicObject::Find(a->pickID()));
if ( pick )
return pick->time().value().toString(_pickTimeFormat.c_str()).c_str();
return timeToString(pick->time().value(), _pickTimeFormat.c_str());
break;
// Picktime
......@@ -1387,11 +1393,10 @@ QVariant ArrivalModel::data(const QModelIndex &index, int role) const {
pick = Pick::Cast(PublicObject::Find(a->pickID()));
if ( pick ) {
if (l++) summary += '\n';
summary += QString("%1").arg(wfid2qstr(pick->waveformID()));
if (l++) summary += '\n';
summary += QString("%1").arg(pick->time().value().toString(_pickTimeFormat.c_str()).c_str());
if ( l++ ) summary += '\n';
summary += wfid2qstr(pick->waveformID());
if ( l++ ) summary += '\n';
summary += timeToString(pick->time().value(), _pickTimeFormat.c_str());
}
/*
......@@ -3301,8 +3306,8 @@ void OriginLocatorView::updateContent() {
Time t = _currentOrigin->time();
Regions regions;
_ui.labelRegion->setText(regions.getRegionName(_currentOrigin->latitude(), _currentOrigin->longitude()).c_str());
//_ui.labelDate->setText(t.toString("%Y-%m-%d").c_str());
_ui.labelTime->setText(t.toString("%Y-%m-%d %H:%M:%S").c_str());
//timeToLabel(_ui.labelDate, timeToString(t, "%Y-%m-%d");
timeToLabel(_ui.labelTime, t, "%Y-%m-%d %H:%M:%S");
double radius;
if ( _config.defaultEventRadius > 0 )
......@@ -3428,8 +3433,7 @@ void OriginLocatorView::updateContent() {
}
try {
std::string t = _currentOrigin->creationInfo().creationTime().toString("%Y-%m-%d %H:%M:%S");
_ui.labelCreated->setText(t.c_str());
timeToLabel(_ui.labelCreated, _currentOrigin->creationInfo().creationTime(), "%Y-%m-%d %H:%M:%S");
}
catch ( ValueException& ) {
_ui.labelCreated->setText("");
......@@ -4869,11 +4873,11 @@ void OriginLocatorView::editComment() {
catch ( ... ) {}
try {
dlg.ui.labelDate->setText(_baseEvent->comment(i)->creationInfo().modificationTime().toString("%F %T").c_str());
timeToLabel(dlg.ui.labelDate, _baseEvent->comment(i)->creationInfo().modificationTime(), "%F %T");
}
catch ( ... ) {
try {
dlg.ui.labelDate->setText(_baseEvent->comment(i)->creationInfo().creationTime().toString("%F %T").c_str());
timeToLabel(dlg.ui.labelDate, _baseEvent->comment(i)->creationInfo().creationTime(), "%F %T");
}
catch ( ... ) {}
}
......
......@@ -55,7 +55,6 @@ Seiscomp::Core::Time OriginTimeDialog::time() const {
_ui.timeEdit->time().second(),
0);
std::cout << t.toString("%F %T") << std::endl;
return t;
}
......