https://en.wikipedia.org/wiki/Unix_time
In computing, Unix time (also known as Epoch time, Posix time,[1] seconds since the Epoch,[2] Unix timestamp or UNIX Epoch time[3]) is a system for describing a point in time. It is the number of seconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.
https://en.wikipedia.org/wiki/Unix_time#Encoding_time_as_a_number
Unix time is a single signed number that increments every second, which makes it easier for computers to store and manipulate than conventional date systems. Interpreter programs can then convert it to a human-readable format.
The Unix epoch is the time 00:00:00 UTC on 1 January 1970.[2] There is a problem with this definition, in that UTC did not exist in its current form until 1972; this issue is discussed below. For brevity, the remainder of this section uses ISO 8601 date and time format, in which the Unix epoch is 1970-01-01T00:00:00Z.
The Unix time number is zero at the Unix epoch and increases by exactly 86400 per day since the epoch. Thus 2004-09-16T00:00:00Z, 12677 days after the epoch, is represented by the Unix time number 12677 × 86400 = 1095292800. This can be extended backwards from the epoch too, using negative numbers; thus 1957-10-04T00:00:00Z, 4472 days before the epoch, is represented by the Unix time number −4472 × 86400 = −386380800. This applies within days as well; the time number at any given time of a day is the number of seconds that has passed since the midnight starting that day added to the time number of that midnight.
https://docs.godotengine.org/en/stable/classes/class_time.html#class-time
The Time singleton allows converting time between various formats and also getting time information from the system.
This class conforms with as many of the ISO 8601 standards as possible. All dates follow the Proleptic Gregorian calendar. As such, the day before 1582-10-15 is 1582-10-14, not 1582-10-04. The year before 1 AD (aka 1 BC) is number 0, with the year before that (2 BC) being -1, etc.
...
When getting time information from the system, the time can either be in the local timezone or UTC depending on the utc parameter. However, the get_unix_time_from_system method always returns the time in UTC.
https://docs.godotengine.org/en/stable/classes/class_time.html#class-time-method-get-datetime-dict-from-unix-time
- Dictionary get_datetime_dict_from_unix_time ( int unix_time_val ) const
Converts the given Unix timestamp to a dictionary of keys: year, month, day, and weekday.
The returned Dictionary's values will be the same as the get_datetime_dict_from_system if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch.
But maybe the easiest one for you to use would be:
https://docs.godotengine.org/en/stable/classes/class_time.html#class-time-method-get-datetime-string-from-system
- String get_datetime_string_from_system ( bool utc=false, bool use_space=false ) const
Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).
The returned values are in the system's local time when utc is false, otherwise they are in UTC.
If use_space is true, use a space instead of the letter T in the middle.
I think this is the one you were really looking for the whole time. No pun intended.