<?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[ntptime.getTimestamp returns incorrect timestamp.]]></title><description><![CDATA[<p dir="auto">version: UIFlow: v1.9.5</p>
<p dir="auto">code:</p>
<p dir="auto">text = M5Label('text', x=38, y=137, color=0x000, font=FONT_MONT_30, parent=None)<br />
text2 = M5Label('text', x=38, y=117, color=0x000, font=FONT_MONT_30, parent=None)<br />
ntp = ntptime.client()<br />
ts = ntp.getTimestamp()<br />
year = ntp.year()<br />
month = ntp.month()<br />
day = ntp.day()<br />
text.set_text('%s' % (ts))<br />
text2.set_text('%s-%s-%s' % (year, month, day))</p>
<p dir="auto">expected:<br />
corrected timestamp as now (2022-09-19 ish).<br />
saw: some strange timestamp in around 1992. (716937583)</p>
<p dir="auto">I'm wondering whether this is within expectation?</p>
]]></description><link>https://community.m5stack.com/topic/4618/ntptime-gettimestamp-returns-incorrect-timestamp</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 02:04:29 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4618.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Sep 2022 21:24:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ntptime.getTimestamp returns incorrect timestamp. on Sun, 08 Jan 2023 17:10:41 GMT]]></title><description><![CDATA[<p dir="auto">Looks like this ntptime timestamp is relative to 01/01/2000, and not to 01/01/1970 like the Epoch Unix timestamp.</p>
]]></description><link>https://community.m5stack.com/post/19779</link><guid isPermaLink="true">https://community.m5stack.com/post/19779</guid><dc:creator><![CDATA[ondrej1024]]></dc:creator><pubDate>Sun, 08 Jan 2023 17:10:41 GMT</pubDate></item><item><title><![CDATA[Reply to ntptime.getTimestamp returns incorrect timestamp. on Thu, 22 Sep 2022 14:44:09 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1663857822895-img_1182.jpg" alt="0_1663857818576_IMG_1182.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> ～</p>
<p dir="auto">Thank you so much for the reply.</p>
<p dir="auto">As you can see from the screenshot:<br />
the year-month-day (text2) shows expected date-time though.<br />
I would assume that we do have successful ntp connection because of text2.<br />
In my real code, the time-server is set as our internal time-server, and the timezone is set as 0 (for UTC).</p>
]]></description><link>https://community.m5stack.com/post/18681</link><guid isPermaLink="true">https://community.m5stack.com/post/18681</guid><dc:creator><![CDATA[chhsiao]]></dc:creator><pubDate>Thu, 22 Sep 2022 14:44:09 GMT</pubDate></item><item><title><![CDATA[Reply to ntptime.getTimestamp returns incorrect timestamp. on Tue, 20 Sep 2022 15:45:41 GMT]]></title><description><![CDATA[<p dir="auto">hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> ～</p>
<p dir="auto">Thank you so much for the reply.<br />
the year-month-day (text2) shows expected date-time though.<br />
I would assume that we do have successful ntp connection because of text2.<br />
In my real code, the time-server is set as our internal time-server, and the timezone is set as 0 (for UTC).</p>
]]></description><link>https://community.m5stack.com/post/18659</link><guid isPermaLink="true">https://community.m5stack.com/post/18659</guid><dc:creator><![CDATA[chhsiao]]></dc:creator><pubDate>Tue, 20 Sep 2022 15:45:41 GMT</pubDate></item><item><title><![CDATA[Reply to ntptime.getTimestamp returns incorrect timestamp. on Tue, 20 Sep 2022 10:50:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/25917">@chhsiao</a> have you set the correct timeszone or tried a different time zone?<br />
1992 would imply that it doesn’t have a valid time click connection</p>
]]></description><link>https://community.m5stack.com/post/18653</link><guid isPermaLink="true">https://community.m5stack.com/post/18653</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 20 Sep 2022 10:50:53 GMT</pubDate></item></channel></rss>