<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[I am looking for internet time M5Stack for Arduino ide]]></title><description><![CDATA[<p dir="auto">Unfortunately, ezTime.h does not work on the M5Stack.</p>
<p dir="auto">Does anyone know of a simple, working way to get the time and date from the internet?</p>
]]></description><link>https://community.m5stack.com/topic/4406/i-am-looking-for-internet-time-m5stack-for-arduino-ide</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 23:33:23 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4406.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 30 Jun 2022 15:35:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 11:57:58 GMT]]></title><description><![CDATA[<p dir="auto">Ahhh - ok:  "//waitForSync（）;" 👍</p>
]]></description><link>https://community.m5stack.com/post/17867</link><guid isPermaLink="true">https://community.m5stack.com/post/17867</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Fri, 01 Jul 2022 11:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 11:08:42 GMT]]></title><description><![CDATA[<p dir="auto">Hello@stoni99</p>
<p dir="auto">ezTime.h</p>
<p dir="auto">I modified the following and got the result.</p>
<p dir="auto">Fix；<br />
#include &lt;WiFi.h&gt;<br />
#include &lt;ezTime.h&gt;<br />
//waitForSync（）;</p>
<p dir="auto">result；<br />
Time in various internet standard formats ...</p>
<p dir="auto">ATOM: 1970-01-01T00:00:09-00:00<br />
COOKIE: Thursday, 01-Jan-1970 00:00:09 UTC<br />
IS8601: 1970-01-01T00:00:09-0000<br />
RFC822: Thu, 01 Jan 70 00:00:09 -0000<br />
RFC850: Thursday, 01-Jan-1970 00:00:09 UTC<br />
RFC1036: Thu, 01 Jan 70 00:00:09 -0000<br />
RFC1123: Thu, 01 Jan 70 00:00:09 -0000<br />
RFC2822: Thu, 01 Jan 70 00:00:09 -0000<br />
RFC3339: 1970-01-01T00:00:09-00:00<br />
RFC3339_EXT: 1970-01-01T00:00:09.771-00:00<br />
RSS: Thu, 01 Jan 70 00:00:09 -0000<br />
W3C: 1970-01-01T00:00:09-00:00</p>
<p dir="auto">... and any other format, like Thursday the 1st of January 1970, 12:00 AM</p>
]]></description><link>https://community.m5stack.com/post/17866</link><guid isPermaLink="true">https://community.m5stack.com/post/17866</guid><dc:creator><![CDATA[macsbug]]></dc:creator><pubDate>Fri, 01 Jul 2022 11:08:42 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 11:02:26 GMT]]></title><description><![CDATA[<p dir="auto">ezTime.h works now. I have updated to new Version. Thx!</p>
]]></description><link>https://community.m5stack.com/post/17865</link><guid isPermaLink="true">https://community.m5stack.com/post/17865</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Fri, 01 Jul 2022 11:02:26 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 10:39:01 GMT]]></title><description><![CDATA[<p dir="auto">ezTime.h seems easier to condition?!🤔</p>
]]></description><link>https://community.m5stack.com/post/17864</link><guid isPermaLink="true">https://community.m5stack.com/post/17864</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Fri, 01 Jul 2022 10:39:01 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 07:45:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/macsbug" aria-label="Profile: macsbug">@<bdi>macsbug</bdi></a> : thank you for presenting the World Time API as alternative solution.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stoni99" aria-label="Profile: Stoni99">@<bdi>Stoni99</bdi></a> : never mind - I am glad to read you have working code now.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17861</link><guid isPermaLink="true">https://community.m5stack.com/post/17861</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 01 Jul 2022 07:45:17 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 07:08:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/macsbug" aria-label="Profile: macsbug">@<bdi>macsbug</bdi></a> said in <a href="/post/17857">I am looking for internet time M5Stack for Arduino ide</a>:</p>
<blockquote>
<p dir="auto">Hell@Stoni99</p>
<p dir="auto">I'm using the World Time API.<br />
It is good to use it according to the area.</p>
<p dir="auto">World Time API : <a href="http://worldtimeapi.org/" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/</a></p>
<p dir="auto">Example<br />
......</p>
</blockquote>
<p dir="auto">Code works - thanks!</p>
]]></description><link>https://community.m5stack.com/post/17860</link><guid isPermaLink="true">https://community.m5stack.com/post/17860</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Fri, 01 Jul 2022 07:08:41 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Fri, 01 Jul 2022 07:07:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> said in <a href="/post/17851">I am looking for internet time M5Stack for Arduino ide</a>:</p>
<blockquote>
<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/stoni99" aria-label="Profile: Stoni99">@<bdi>Stoni99</bdi></a></p>
<p dir="auto">your code runs fine on my M5Stack.</p>
<ul>
<li>what happens if you comment out waitForSync()?</li>
<li>what is the log output of the crash?</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
</blockquote>
<p dir="auto">What do you mean by comment out?<br />
I don't have log output , it just restarts.</p>
]]></description><link>https://community.m5stack.com/post/17859</link><guid isPermaLink="true">https://community.m5stack.com/post/17859</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Fri, 01 Jul 2022 07:07:08 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Mon, 17 Oct 2022 05:41:21 GMT]]></title><description><![CDATA[<p dir="auto">Hell@Stoni99</p>
<p dir="auto">I'm using the World Time API.<br />
It is good to use it according to the area.</p>
<p dir="auto">World Time API : <a href="http://worldtimeapi.org/" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/</a></p>
<p dir="auto">Example</p>
<p dir="auto">//===========================================================<br />
// Web WorldTime M5Stack : 2022.07.01 : macsbug<br />
// 開発環境      : Arduino IDE 1.8.19<br />
//              : Board : ”M5Stack-Core-ESP32”<br />
//              : Board Manager : arduino-esp32 2.0.3-RC1<br />
// Device       : M5Stack<br />
// Library      : M5Stack.h , WiFi.h , HTTPClient.h<br />
//===========================================================<br />
// WorldTimeAPI : <a href="http://worldtimeapi.org/" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/</a><br />
//  TomeZpone   : <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" target="_blank" rel="noopener noreferrer nofollow ugc">https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a><br />
//  Tokyo       : <a href="http://worldtimeapi.org/api/timezone/Asia/Bangkok" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/api/timezone/Asia/Bangkok</a><br />
//  Chicago     : <a href="http://worldtimeapi.org/api/timezone/America/Chicago" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/api/timezone/America/Chicago</a><br />
//===========================================================</p>
<p dir="auto">#include &lt;M5Stack.h&gt;<br />
#include &lt;WiFi.h&gt;<br />
#include &lt;HTTPClient.h&gt;</p>
<p dir="auto">const char *ssid = "xxxx";// Wi-Fi access point<br />
const char *pass = "xxxx";// Wi-Fi password<br />
const char *WTA  = "<a href="http://worldtimeapi.org/api/timezone/Asia/Bangkok" target="_blank" rel="noopener noreferrer nofollow ugc">http://worldtimeapi.org/api/timezone/Asia/Bangkok</a>"; // WTA,BANGKOK<br />
int _year, _mon, _day, _hour, _min, _sec;</p>
<p dir="auto">//============================================================<br />
// WorldTime : web dada = {<br />
// "abbreviation":"JST","client_ip":"127.0.0.0",<br />
// "datetime":"2022-06-25T08:18:17.061071+09:00",<br />
// "_day_of_week":6,"_day_of_year":176,"dst":false,<br />
// "dst_from":null,"dst_offset":0,"dst_until":null,<br />
// "raw_offset":25200"timezone":"Asia/Bangkok",<br />
// "unixtime":1656112697,<br />
// "utc_datetime":"2022-06-24T23:18:17.061071+00:00",<br />
// "utc_offset":"+09:00","week_number":25}<br />
//============================================================<br />
void WorldTimeAPI(){<br />
if ((WiFi.status() == WL_CONNECTED)){<br />
HTTPClient http;<br />
http.begin(WTA);                 // Specify URL<br />
int httpCode = http.GET();       // Send GET request<br />
if (httpCode &gt; 0) {              // If there is a reply<br />
String web = http.getString(); // WEB Data acquisition<br />
// Serial.print("web dada = ");Serial.println(web);</p>
<pre><code>  // "datetime":"2022-06-25T08:06:30.948882+09:00",
  //  00000000001111111111222222222233333333334444
  //  01234567890123456789012345678901234567890123
  int pos = web.indexOf("datetime") + 11;    
  _year = web.substring(pos   , pos+ 4  ).toInt();
  _mon  = web.substring(pos +5, pos+ 5+2).toInt();
  _day  = web.substring(pos +8, pos+ 8+2).toInt();
  _hour = web.substring(pos+11, pos+11+2).toInt();
  _min  = web.substring(pos+14, pos+14+2).toInt();
  _sec  = web.substring(pos+17, pos+17+2).toInt();

  char ymm[12];sprintf(ymm,"%4d/%02d/%02d"   ,_year,_mon,_day);
  char hms[10];sprintf(hms,"%02d:%02d:%02d\n",_hour,_min,_sec);
  M5.Lcd.print(ymm);M5.Lcd.print(" ");M5.Lcd.println(hms);
  
}else{ Serial.println("Error on HTTP request");}
http.end();   // Free the resources
</code></pre>
<p dir="auto">}<br />
}</p>
<p dir="auto">//===========================================================<br />
void setup(){<br />
M5.begin();<br />
M5.Lcd.setSwapBytes(true);<br />
M5.Lcd.setRotation(1);<br />
M5.Lcd.fillScreen(TFT_BLUE);<br />
M5.Lcd.setTextColor(TFT_WHITE);<br />
M5.Lcd.setTextSize(2);<br />
M5.Lcd.printf(" Wi-Fi Connecting to %s\n", ssid);<br />
WiFi.begin(ssid, pass);<br />
while (WiFi.status() != WL_CONNECTED){delay(500);M5.Lcd.print(".");}<br />
M5.Lcd.println();<br />
}</p>
<p dir="auto">//===========================================================<br />
void loop(){<br />
WorldTimeAPI();<br />
delay(1000);<br />
}<br />
//===========================================================</p>
]]></description><link>https://community.m5stack.com/post/17857</link><guid isPermaLink="true">https://community.m5stack.com/post/17857</guid><dc:creator><![CDATA[macsbug]]></dc:creator><pubDate>Mon, 17 Oct 2022 05:41:21 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Thu, 30 Jun 2022 20:14:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/stoni99" aria-label="Profile: Stoni99">@<bdi>Stoni99</bdi></a></p>
<p dir="auto">your code runs fine on my M5Stack.</p>
<ul>
<li>what happens if you comment out waitForSync()?</li>
<li>what is the log output of the crash?</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17851</link><guid isPermaLink="true">https://community.m5stack.com/post/17851</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 30 Jun 2022 20:14:33 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Thu, 30 Jun 2022 16:15:21 GMT]]></title><description><![CDATA[<p dir="auto">I tried example codes. After establishing the Internet connection, the M5Stack crashes and restarts. He doesn't seem to tolerate waitForSync();</p>
<p dir="auto">#include &lt;M5Stack.h&gt;<br />
#include "WiFi.h"<br />
#include "ezTime.h"</p>
<p dir="auto">const char *ssid     = "xxxxxxxxxxx";<br />
const char *password = "xxxxxxxxxxx";</p>
<p dir="auto">void setup(){<br />
<a href="//Serial.begin" target="_blank" rel="noopener noreferrer nofollow ugc">//Serial.begin</a>(115200);<br />
M5.begin();<br />
M5.Power.begin();<br />
WiFi.mode(WIFI_STA);<br />
WiFi.disconnect();<br />
delay(100);<br />
WiFi.begin(ssid, password);<br />
M5.Lcd.print("Call to " + String(ssid));<br />
while (WiFi.status() != WL_CONNECTED) {<br />
M5.Lcd.print('.');<br />
delay(1000);<br />
}<br />
M5.Lcd.println(" ");<br />
M5.Lcd.println(WiFi.localIP());<br />
M5.Lcd.print("Signalstearke: ");<br />
M5.Lcd.println(WiFi.RSSI());<br />
<a href="//server.begin" target="_blank" rel="noopener noreferrer nofollow ugc">//server.begin</a>();<br />
delay(2000);<br />
M5.Lcd.clear();</p>
<p dir="auto">waitForSync();<br />
M5.Lcd.println();<br />
M5.Lcd.println("Time in various internet standard formats ...");<br />
M5.Lcd.println();<br />
M5.Lcd.println("ATOM:        " + dateTime(ATOM));<br />
M5.Lcd.println("COOKIE:      " + dateTime(COOKIE));<br />
M5.Lcd.println("IS8601:      " + dateTime(ISO8601));<br />
M5.Lcd.println("RFC822:      " + dateTime(RFC822));<br />
M5.Lcd.println("RFC850:      " + dateTime(RFC850));<br />
M5.Lcd.println("RFC1036:     " + dateTime(RFC1036));<br />
M5.Lcd.println("RFC1123:     " + dateTime(RFC1123));<br />
M5.Lcd.println("RFC2822:     " + dateTime(RFC2822));<br />
M5.Lcd.println("RFC3339:     " + dateTime(RFC3339));<br />
M5.Lcd.println("RFC3339_EXT: " + dateTime(RFC3339_EXT));<br />
M5.Lcd.println("RSS:         " + dateTime(RSS));<br />
M5.Lcd.println("W3C:         " + dateTime(W3C));<br />
M5.Lcd.println();<br />
M5.Lcd.println(" ... and any other format, like "" + dateTime("l ~t~h~e jS ~o~f F Y, g:i A") + """);<br />
delay(6000);<br />
}</p>
<p dir="auto">void loop() {<br />
events();<br />
}</p>
]]></description><link>https://community.m5stack.com/post/17850</link><guid isPermaLink="true">https://community.m5stack.com/post/17850</guid><dc:creator><![CDATA[Stoni99]]></dc:creator><pubDate>Thu, 30 Jun 2022 16:15:21 GMT</pubDate></item><item><title><![CDATA[Reply to I am looking for internet time M5Stack for Arduino ide on Thu, 30 Jun 2022 15:59:20 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/stoni99" aria-label="Profile: Stoni99">@<bdi>Stoni99</bdi></a></p>
<p dir="auto">are you sure? From the description Rob developed <a href="https://github.com/ropg/ezTime" target="_blank" rel="noopener noreferrer nofollow ugc">ezTime</a> together with M5ez for M5Stack.</p>
<p dir="auto">What exactly doesn't work for you? Care to share your code?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/17849</link><guid isPermaLink="true">https://community.m5stack.com/post/17849</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 30 Jun 2022 15:59:20 GMT</pubDate></item></channel></rss>