Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:fe2e90c1c706
- Parent:
- 0:98c914fd9dae
- Child:
- 2:7b8ab39a1b6d
--- a/main.cpp Thu Jun 18 14:21:36 2020 +0000 +++ b/main.cpp Fri Jun 19 09:12:31 2020 +0000 @@ -65,14 +65,17 @@ char buffer [128]; time (&rawtime); //rawtime = rawtime - (4*60*60); // UTC - 4hours ... serious hack which only works in summer - rawtime = rawtime + 3600; + rawtime = rawtime + 3600; // GMT + 1 for BST timeinfo = localtime (&rawtime); strftime (buffer,sizeof(buffer),"%r",timeinfo); GUI_SetFont(GUI_FONT_32B_1); - GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2); + GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2 - 20); + strftime (buffer,sizeof(buffer),"%A",timeinfo); + GUI_SetFont(GUI_FONT_32B_1); + GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2 + 20); strftime (buffer,sizeof(buffer),"%D",timeinfo); GUI_SetFont(GUI_FONT_32B_1); - GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2 + 40); + GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2 + 60); } /****************************************************************************************** * NTPTimeThread