Skip to content

Commit

Permalink
Revert "Fix UTC to local time conversion error in DisplayForecastWeat…
Browse files Browse the repository at this point in the history
…her for some examples."

This reverts commit b9e620d.
  • Loading branch information
skiphansen committed Dec 8, 2021
1 parent b9e620d commit f83ebab
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/M5_CoreInk/M5_CoreInk.ino
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void DisplayForecastWeather(int x, int y, int offset, int index) {
display.drawRect(x, y, offset, 65, GxEPD_BLACK);
display.drawLine(x, y + 13, x + offset, y + 13, GxEPD_BLACK);
DisplayWxIcon(x + offset / 2 + 1, y + 35, WxForecast[index].Icon, SmallIcon);
drawString(x + offset / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + offset / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + offset / 2, y + 50, String(WxForecast[index].High, 0) + "/" + String(WxForecast[index].Low, 0), CENTER);
}
//#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/Waveshare_1_54/Waveshare_1_54.ino
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void DisplayForecastWeather(int x, int y, int offset, int index) {
display.drawRect(x, y, offset, 65, GxEPD_BLACK);
display.drawLine(x, y + 13, x + offset, y + 13, GxEPD_BLACK);
DisplayWxIcon(x + offset / 2 + 1, y + 35, WxForecast[index].Icon, SmallIcon);
drawString(x + offset / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + offset / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + offset / 2, y + 50, String(WxForecast[index].High, 0) + "/" + String(WxForecast[index].Low, 0), CENTER);
}
//#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/Waveshare_4_2/Waveshare_4_2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void DrawForecastWeather(int x, int y, int index) {
display.drawRect(x, y, 55, 65, GxEPD_BLACK);
display.drawLine(x + 1, y + 13, x + 54, y + 13, GxEPD_BLACK);
DisplayWXicon(x + 28, y + 35, WxForecast[index].Icon, SmallIcon);
drawString(x + 31, y + 3, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + 31, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + 41, y + 52, String(WxForecast[index].High, 0) + "° / " + String(WxForecast[index].Low, 0) + "°", CENTER);
}
//#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/Waveshare_7_5/Waveshare_7_5.ino
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void DisplayForecastWeather(int x, int y, int index) {
display.drawRect(x, y, fwidth - 1, 65, GxEPD_BLACK);
display.drawLine(x, y + 13, x + fwidth - 3, y + 13, GxEPD_BLACK);
DisplayConditionsSection(x + fwidth / 2, y + 35, WxForecast[index].Icon, SmallIcon);
drawString(x + fwidth / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + fwidth / 2, y + 3, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + fwidth / 2, y + 53, String(WxForecast[index].High, 0) + "°/" + String(WxForecast[index].Low, 0) + "°", CENTER);
}
//#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/Waveshare_7_5_T7/Waveshare_7_5_T7.ino
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void DisplayForecastWeather(int x, int y, int index) {
display.drawRect(x, y, fwidth - 1, 81, GxEPD_BLACK);
display.drawLine(x, y + 16, x + fwidth - 3, y + 16, GxEPD_BLACK);
DisplayConditionsSection(x + fwidth / 2, y + 43, WxForecast[index].Icon, SmallIcon);
drawString(x + fwidth / 2, y + 4, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + fwidth / 2, y + 4, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + fwidth / 2 + 12, y + 66, String(WxForecast[index].High, 0) + "°/" + String(WxForecast[index].Low, 0) + "°", CENTER);
}
//#########################################################################################
Expand Down
2 changes: 1 addition & 1 deletion examples/Waveshare_9_7/Waveshare_9_7.ino
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void DisplayForecastWeather(int x, int y, int index) {
display.drawLine(x, y + 40, x + fwidth - 3, y + 40, GxEPD_BLACK);
DisplayConditionsSection(x + fwidth / 2, y + 90, WxForecast[index].Icon, SmallIcon);
u8g2Fonts.setFont(u8g2_font_helvB14_tf);
drawString(x + fwidth / 2 - 10, y + 20, String(ConvertUnixTime(WxForecast[index].Dt).substring(0,5)), CENTER);
drawString(x + fwidth / 2 - 10, y + 20, String(ConvertUnixTime(WxForecast[index].Dt + WxConditions[0].Timezone).substring(0,5)), CENTER);
drawString(x + fwidth / 2 + 0, y + 130, String(WxForecast[index].High, 0) + "°/" + String(WxForecast[index].Low, 0) + "°", CENTER);
}
//#########################################################################################
Expand Down

0 comments on commit f83ebab

Please sign in to comment.