# Time External

**URL:** <https://forum.arduino.cc/t/time-external/493381>\
**Category:** Programming\
**Created:** [November 26, 2017, 2:08am UTC](https://forum.arduino.cc/t/time-external/493381 "2017-11-26T02:08:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunlitho](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sunlitho](https://forum.arduino.cc/u/sunlitho)\
**Post date:** [November 26, 2017, 2:08am UTC](https://forum.arduino.cc/t/time-external/493381/1 "2017-11-26T02:08:37Z")

</div>

What's the method for bringing in the current time, as a variable, when I'm using the USB from my PC?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [November 26, 2017, 3:15am UTC](https://forum.arduino.cc/t/time-external/493381/2 "2017-11-26T03:15:05Z")

</div>

The PC has to send it. You can't just request it.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 26, 2017, 3:45pm UTC](https://forum.arduino.cc/t/time-external/493381/3 "2017-11-26T15:45:40Z")

</div>

> aarg:  
> The PC has to send it. You can't just request it.

Even if the PC has to send it, it may still be necessary for the Arduino to request it. It all depends on what application on the PC is going to supply the date and time as a string.

---

<div class="post-metadata">

**Author:** ![Johnny010](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnny010/32/1099305_2.png) [@Johnny010](https://forum.arduino.cc/u/Johnny010)\
**Post date:** [November 26, 2017, 3:59pm UTC](https://forum.arduino.cc/t/time-external/493381/5 "2017-11-26T15:59:03Z")

</div>

A simple python script would suffice...  
[https://pythonhosted.org/pyserial/](https://pythonhosted.org/pyserial/)

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [November 26, 2017, 4:09pm UTC](https://forum.arduino.cc/t/time-external/493381/6 "2017-11-26T16:09:42Z")

</div>

Sometimes it's easier to give the Arduino an Ethernet or Wifi connection, and make an SNTP request. Then you don't need a PC. Python is cool, though. I imagine there is a lot more you could orchestrate with the PC in addition to getting the time.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 10:51pm UTC](https://forum.arduino.cc/t/time-external/493381/7 "2021-05-05T22:51:36Z")

</div>

Closed on May 5, 2021, 10:51pm UTC


