What's the method for bringing in the current time, as a variable, when I'm using the USB from my PC?
The PC has to send it. You can't just request it.
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.
PaulS:
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.
Sure, but either way the point is that the PC has to have some program running on it to send it, at request or every so often. The Arduino can't make it happen all on its own.
A simple python script would suffice...
https://pythonhosted.org/pyserial/
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.