for myself

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed

Fork of NTPClient_HelloWorld by Donatien Garnier

Files at this revision

API Documentation at this revision

Comitter:
kityann
Date:
Tue Nov 10 06:11:12 2015 +0000
Parent:
2:bf7dc5f5bca9
Commit message:
for myself

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Sun Aug 05 16:17:31 2012 +0000
+++ b/EthernetInterface.lib	Tue Nov 10 06:11:12 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#2a797ba9babe
+http://mbed.org/users/mbed_official/code/EthernetInterface/#097a9996f8d5
--- a/main.cpp	Sun Aug 05 16:17:31 2012 +0000
+++ b/main.cpp	Tue Nov 10 06:11:12 2015 +0000
@@ -12,12 +12,19 @@
     eth.connect();
    
     printf("Trying to update time...\r\n");
-    if (ntp.setTime("0.pool.ntp.org") == 0)
+    if (ntp.setTime("ntp.jst.mfeed.ad.jp") == 0)
     {
       printf("Set time successfully\r\n");
       time_t ctTime;
       ctTime = time(NULL);
-      printf("Time is set to (UTC): %s\r\n", ctime(&ctTime));
+      ctTime += 32400;
+      printf("Time is set to (JPN): %s\r\n", ctime(&ctTime));
+      while(1){
+        wait(10);
+              ctTime = time(NULL);
+      ctTime += 32400;
+        printf("Time is set to (JPN): %s\r\n", ctime(&ctTime));    
+      }
     }
     else
     {
--- a/mbed-rtos.lib	Sun Aug 05 16:17:31 2012 +0000
+++ b/mbed-rtos.lib	Tue Nov 10 06:11:12 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#9654a71f5a90
+http://mbed.org/users/mbed_official/code/mbed-rtos/#5dfe422a963d
--- a/mbed.bld	Sun Aug 05 16:17:31 2012 +0000
+++ b/mbed.bld	Tue Nov 10 06:11:12 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/976df7c37ad5
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file