cleanup: remove early kernel-mode PanelBar functionality
This commit is contained in:
1 parent
d93e111783
commit
240399b0fb
4 files changed
+1
-55
No files matched your search
@@ -70,14 +70,6 @@ static Timekeeping::DateTime EpochToDate(int64_t epoch) {
|
||||
void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour, uint8_t Minute, uint8_t Second) {
|
||||
g_bootEpoch = DateToEpoch(Year, Month, Day, Hour, Minute, Second);
|
||||
|
||||
/* Apply default timezone offset for boot log display */
|
||||
int adjMin = Minute + (g_tzOffsetMinutes % 60);
|
||||
int adjHour = Hour + (g_tzOffsetMinutes / 60);
|
||||
if (adjMin < 0) { adjMin += 60; adjHour -= 1; }
|
||||
if (adjMin >= 60) { adjMin -= 60; adjHour += 1; }
|
||||
if (adjHour < 0) adjHour += 24;
|
||||
if (adjHour >= 24) adjHour -= 24;
|
||||
|
||||
int offH = g_tzOffsetMinutes / 60;
|
||||
int offM = g_tzOffsetMinutes % 60;
|
||||
if (offM < 0) offM = -offM;
|
||||
@@ -86,35 +78,6 @@ void Timekeeping::Init(uint16_t Year, uint8_t Month, uint8_t Day, uint8_t Hour,
|
||||
<< (offH >= 0 ? "+" : "") << offH
|
||||
<< (offM ? ":" : "") << (offM >= 10 ? "" : (offM ? "0" : ""))
|
||||
<< (offM ? offM : 0);
|
||||
|
||||
kcp::cstringstream minuteStream;
|
||||
if (adjMin < 10) {
|
||||
minuteStream << "0";
|
||||
}
|
||||
minuteStream << adjMin;
|
||||
CString minuteStr = minuteStream.c_str();
|
||||
|
||||
kcp::cstringstream secondStream;
|
||||
if (Second < 10) {
|
||||
secondStream << "0";
|
||||
}
|
||||
secondStream << Second;
|
||||
CString secondStr = secondStream.c_str();
|
||||
|
||||
kcp::cstringstream panelStr;
|
||||
panelStr
|
||||
<< " "
|
||||
<< Day << " "
|
||||
<< Months[Month] << " "
|
||||
<< Year << ", "
|
||||
<< adjHour << ":"
|
||||
<< minuteStr << ":"
|
||||
<< secondStr
|
||||
<< " (UTC" << (offH >= 0 ? "+" : "") << offH << ")";
|
||||
|
||||
CString dateString = panelStr.c_str();
|
||||
|
||||
UpdatePanelBar(dateString);
|
||||
}
|
||||
|
||||
int64_t Timekeeping::GetUnixTimestamp() {
|
||||
|
||||
Reference in new issue
Block a user