Andrew Reed
/
NTP-Demo+Sensor
NTP demo for cypress Pioneer and Proto Dev kits also reads available analogue sensors
Diff: main.cpp
- Revision:
- 1:352a27b3a1ec
- Parent:
- 0:01c8e1277c91
- Child:
- 2:a92d7ea0f3e3
diff -r 01c8e1277c91 -r 352a27b3a1ec main.cpp --- a/main.cpp Wed Jul 01 16:01:27 2020 +0100 +++ b/main.cpp Wed Jul 01 16:13:35 2020 +0100 @@ -100,7 +100,7 @@ //rawtime = rawtime - (4*60*60); // UTC - 4hours ... serious hack which only works in summer rawtime = rawtime + 3600; // GMT + 1 for BST timeinfo = localtime (&rawtime); - strftime (buffer,sizeof(buffer)," %R ",timeinfo); + strftime (buffer,sizeof(buffer)," %r ",timeinfo); GUI_SetFont(GUI_FONT_32B_1); GUI_DispStringHCenterAt(buffer,LCD_GetXSize()/2,LCD_GetYSize()/2 - GUI_GetFontSizeY()/2 - 20); printf("%s\r\n", buffer);