mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 14:39:18 +02:00
uart fixes, odometer and time/date on uart, simulation time fixes
This commit is contained in:
@@ -33,8 +33,8 @@ scenario_time::init(std::time_t timestamp) {
|
||||
// cache requested elements, if any
|
||||
|
||||
std::tm *tms = std::gmtime(×tamp);
|
||||
m_time.wYear = tms->tm_year;
|
||||
m_time.wMonth = tms->tm_mon;
|
||||
m_time.wYear = tms->tm_year + 1900;
|
||||
m_time.wMonth = tms->tm_mon + 1;
|
||||
m_time.wDayOfWeek = tms->tm_wday;
|
||||
m_time.wDay = tms->tm_mday;
|
||||
m_time.wHour = tms->tm_hour;
|
||||
@@ -53,7 +53,7 @@ scenario_time::init(std::time_t timestamp) {
|
||||
if( ( requestedhour != -1 )
|
||||
|| ( requestedminute != 1 ) ) {
|
||||
m_time.wSecond = 0;
|
||||
}
|
||||
}
|
||||
|
||||
m_yearday = year_day( m_time.wDay, m_time.wMonth, m_time.wYear );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user