Scilab-Branch-6.1-GIT
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
clock
Return the current Gregorian datetime and international time zone of the computer's clock
Syntax
[datetime, timezone, Dst] = clock()
Arguments
- datetime
- [year, month, day, hour, minute, second] vector.
The first five elements are integers. The
second
element is accurate up to the millisecond. - timezone
- A scalar multiple of 0.25 in [-12, 12]. Most of geographical areas have an
integer time zone. A few are on a half-an-hour or even a quarter time zone.
timezone
< 0 for Brasil, and > 0 for France, Russia, and Japan, etc. - Dst
- 0 or 1: Daylight saving time. 1 if the time area of the computer is registered to apply a Daylight saving time offset, and currently applies it ; 0 otherwise.
Description
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. |
Examples
[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)
--> 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"
See also
History
Version | Description |
6.1.1 | Time zone and Daylight saving time outputs added. |
Report an issue | ||
<< calendar | Time and Date | date >> |