StelLocaleMgr.cpp   StelLocaleMgr.cpp 
skipping to change at line 287 skipping to change at line 287
case STime24h: case STime24h:
return t.toString("hh:mm:ss"); return t.toString("hh:mm:ss");
case STime12h: case STime12h:
return t.toString("hh:mm:ss ap"); return t.toString("hh:mm:ss ap");
default: default:
qWarning() << "WARNING: unknown date format, fallbac k to system default"; qWarning() << "WARNING: unknown date format, fallbac k to system default";
return t.toString(Qt::LocaleDate); return t.toString(Qt::LocaleDate);
} }
} }
QString StelLocaleMgr::getPrintableTimeZoneLocal(double JD) const
{
double shift = StelUtils::getGMTShiftFromQT(JD);
QTime tz = QTime(0, 0, 0).addSecs(3600*qAbs(shift));
if(shift<0.0f)
return "UTC-" + tz.toString("hh:mm");
else
return "UTC+" + tz.toString("hh:mm");
}
// Convert the time format enum to its associated string and reverse // Convert the time format enum to its associated string and reverse
StelLocaleMgr::STimeFormat StelLocaleMgr::stringToSTimeFormat(const QString & tf) const StelLocaleMgr::STimeFormat StelLocaleMgr::stringToSTimeFormat(const QString & tf) const
{ {
if (tf == "system_default") return STimeSystemDefault; if (tf == "system_default") return STimeSystemDefault;
if (tf == "24h") return STime24h; if (tf == "24h") return STime24h;
if (tf == "12h") return STime12h; if (tf == "12h") return STime12h;
qWarning() << "WARNING: unrecognized time_display_format : " << tf < < " system_default used."; qWarning() << "WARNING: unrecognized time_display_format : " << tf < < " system_default used.";
return STimeSystemDefault; return STimeSystemDefault;
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/