DateTimeDialog.cpp   DateTimeDialog.cpp 
skipping to change at line 112 skipping to change at line 112
// Nothing for now // Nothing for now
} }
/************************************************************************ /************************************************************************
year slider or dial changed year slider or dial changed
************************************************************************/ ************************************************************************/
void DateTimeDialog::yearChanged(int newyear) void DateTimeDialog::yearChanged(int newyear)
{ {
if ( year != newyear ) { if ( year != newyear ) {
valid( newyear, month, day, hour, minute, second ); valid( newyear, month, day, hour, minute, second );
} }
} }
void DateTimeDialog::monthChanged(int newmonth) void DateTimeDialog::monthChanged(int newmonth)
{ {
if ( month != newmonth ) { if ( month != newmonth ) {
valid( year, newmonth, day, hour, minute, second ); valid( year, newmonth, day, hour, minute, second );
} }
} }
void DateTimeDialog::dayChanged(int newday) void DateTimeDialog::dayChanged(int newday)
{ {
if ( day != newday ) { if ( day != newday ) {
valid( year, month, newday, hour, minute, second ); valid( year, month, newday, hour, minute, second );
} }
} }
void DateTimeDialog::hourChanged(int newhour) void DateTimeDialog::hourChanged(int newhour)
{ {
if ( hour != newhour ) { if ( hour != newhour ) {
valid( year, month, day, newhour, minute, second ); valid( year, month, day, newhour, minute, second );
} }
} }
void DateTimeDialog::minuteChanged(int newminute) void DateTimeDialog::minuteChanged(int newminute)
{ {
if ( minute != newminute ) { if ( minute != newminute ) {
valid( year, month, day, hour, newminute, second ); valid( year, month, day, hour, newminute, second );
} }
} }
void DateTimeDialog::secondChanged(int newsecond) void DateTimeDialog::secondChanged(int newsecond)
{ {
if ( second != newsecond ) { if ( second != newsecond ) {
valid( year, month, day, hour, minute, newsecond ); valid( year, month, day, hour, minute, newsecond );
} }
} }
double DateTimeDialog::newJd() double DateTimeDialog::newJd()
{ {
double jd; double jd;
StelUtils::getJDFromDate(&jd,year, month, day, hour, minute, second); StelUtils::getJDFromDate(&jd,year, month, day, hour, minute, second);
jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0); // lo cal tz -> UTC jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0); // lo cal tz -> UTC
return jd; return jd;
} }
skipping to change at line 169 skipping to change at line 169
ui->spinner_hour->setValue(hour); ui->spinner_hour->setValue(hour);
ui->spinner_minute->setValue(minute); ui->spinner_minute->setValue(minute);
ui->spinner_second->setValue(second); ui->spinner_second->setValue(second);
} }
/************************************************************************ /************************************************************************
Send newJd to spinner_* Send newJd to spinner_*
************************************************************************/ ************************************************************************/
void DateTimeDialog::setDateTime(double newJd) void DateTimeDialog::setDateTime(double newJd)
{ {
StelUtils::getDateFromJulianDay(newJd, &year, &month, &day); newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift(newJd)/2
StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &second); 4.0); // UTC -> local tz
pushToWidgets(); StelUtils::getDateFromJulianDay(newJd, &year, &month, &day);
StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &second);
pushToWidgets();
} }
 End of changes. 7 change blocks. 
9 lines changed or deleted 11 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/