Some Questions and Problems

stealth977

12-02-2009 09:14:43

First, The Question: Is there a way to write back a modified *.os script?

Second the strange problem:

int year,month,day,hour,minute;
Caelum::LongReal second;
Caelum::LongReal jd = m_Handle->getUniversalClock()->getJulianDay();
Caelum::Astronomy::getGregorianDateTimeFromJulianDay(jd,year,month,day,hour,minute,second);
hour = 17;
m_Handle->getUniversalClock()->setGregorianDateTime(year,month,day,hour,minute,second);
jd = m_Handle->getUniversalClock()->getJulianDay();
Caelum::Astronomy::getGregorianDateTimeFromJulianDay(jd,year,month,day,hour,minute,second);


result of 1st GregorianDate = 2000 , 1, 1, 12, 0, 0 ,0.0000000000
Changed Hour to 17
result of 2nd GregorianDate = 2000 , 1, 1, 18, 0, 0 ,0.0000000000

Although I set hour to 17, when i read back it becomes 18, it happens with some other hour ranges too..

Do you have any idea why this is happening?

Stealth,