Time Library Adjust Default on Windows Looking at this Time Arduino library because I would like to send time stamps with data across my HC05-PC channel. 

https://playground.arduino.cc/Code/Time

I wrote this function to get the time at any point

String getTime() {
    String timeSecond = String(second());
    String timeMinute = String(minute());
    String timeHour = String(hour());
    String timeDay = String(day());
    String timeMonth = String(month());
    String timeYear = String(year());

    String now = timeHour + ":" + timeMinute + ":" + timeSecond + " " + 
        timeMonth + "/" + timeDay + "/" + timeYear;

    return now;
}


It seems in the docs he provides info on how to set the default time on a Linux/Unix system so that this library will always be grabbing the correct time by editing some bash files. 

When I run the function, having been compiled on Windows, it begins running on 1/1/1970 0:0:0.

He does not provide any documentation for setting the Windows time stamp. How would I go about doing that?
The Adafruit RTClib has a function to use the compiler date and time. You use the TimeLib maintained by Paul Stoffregen. That library does not have such a function, but you can write it yourself. For example with sscanf and setTime. Without external RTC that will only work if you upload a sketch and keep the Arduino always on. I have a clock like that, and since that clock is always on, I never had the need to add a RTC chip. When the Arduino resets, it returns to the date and time when it was compiled.

If you use a Arduino Due or Zero or M0 then they have their own rtc library.

If you want the computer to send the date and time, then you could make a command and send that via the serial port or via Bluetooth.

What kind of date and time do you want ? The local time, including the offset of the Daylight Saving Time ? That is possible, but not easy to make on a Arduino with RTC chip, in that case it is easier to send a command from the computer with the newest date and time.

It that function okay ? The object 'now' disappeares when the function ends, and yet you return that object.