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:192f9ba6a3a0
- Parent:
- 0:c2d94fad50a4
--- a/main.cpp Wed Sep 16 10:08:31 2020 +0000
+++ b/main.cpp Mon Sep 21 08:26:01 2020 +0000
@@ -8,7 +8,7 @@
*
* ST NUCLEO L476RG and ST IDW04A1 used for testing
*
- * Timo Karppinen 15.9.2020
+ * Timo Karppinen 15.9.2020 Apache-2.0
***********************************/
#include "mbed.h"
@@ -130,6 +130,8 @@
if (timestamp < 0) {
printf("An error occurred when getting the time. Code: %u\r\n", timestamp);
} else {
+ printf("The timestamp seconds from the NTP server in\r\n 32 bit hexadecimal number is %X\r\n", timestamp);
+ printf(" decimal number is %u\r\n", timestamp);
timestamp += (60*60*3); // GMT +3 for Finland for the summer time.
printf("Current time is %s\r\n", ctime(×tamp));
}