Ticket #2838: mythshutdown-wakeupcmd.diff
File mythshutdown-wakeupcmd.diff, 1.1 KB (added by , 17 years ago) |
---|
-
programs/mythshutdown/main.cpp
413 413 if (dtCurrent.secsTo(dtWakeupTime) > 15 * 60) 414 414 { 415 415 QString nvramCommand = gContext->GetSetting("MythShutdownNvramCmd", 416 "/usr/bin/nvram-wakeup"); 417 nvramCommand += QString(" --settime %1") 418 .arg(dtWakeupTime.toTime_t()); 416 "/usr/bin/nvram-wakeup --settime $time"); 419 417 418 QString wakeup_timeformat = gContext->GetSetting("WakeupTimeFormat"); 419 420 if (wakeup_timeformat == "time_t") 421 { 422 QString time_ts; 423 nvramCommand.replace("$time", time_ts.setNum(dtWakeupTime.toTime_t())); 424 } 425 else 426 nvramCommand.replace("$time", dtWakeupTime.toString(wakeup_timeformat)); 427 428 420 429 VERBOSE(VB_IMPORTANT, QString("sending command to set time in bios\n\t\t\t%1") 421 430 .arg(nvramCommand));