Return the current Gregorian datetime and international time zone of the computer's clock
[datetime, timezone, Dst] = clock()
second element
is accurate up to the millisecond.
timezone < 0 for Brasil, and > 0 for France, Russia,
and Japan, etc.
clock() returns the current state of the clock of the computer. This clock is registered for a given time zone and area, and provides the local legal time.
![]() | The time zone of the computer can also be retrieved through the computer's OS.
However, when a Daylight saving time offset applies, the returned
time zone may include it. |
[datetime, tz, Dst] = clock() | ![]() | ![]() |
--> [datetime, tz, Dst] = clock() datetime = 2020. 7. 23. 21. 26. 36.979 tz = 1. Dst = 1.
More information, on Windows:
--> powershell("Get-Timezone")(3:8)
ans =
"Id : Romance Standard Time"
"DisplayName : (UTC+01:00) Bruxelles, Copenhague, Madrid, Paris"
"StandardName : Paris, Madrid"
"DaylightName : Paris, Madrid (heure d'été)"
"BaseUtcOffset : 01:00:00"
"SupportsDaylightSavingTime : True"
| Version | Description |
| 6.1.1 | Time zone and Daylight saving time outputs added. |