Get UTC Time, Convert a UTC time to Datenum (supports vectors, Win/Linux)

Get a UTC time using standard C time function, convert UTC time to MATLAB serial date ...
7,9K descargas
Actualizado 28 jun 2006

Sin licencia

UTC time (universal time convention) is used in ANSI-C standard for defining time. This is measured in seconds since 1970, at the Prime Meridian. By definition, UTC does not depend on Daylight Savings Time. The UTC_TIME function uses a C-MEX function to get the System Time in UTC format.

Another function UTC2DATENUM will convert any UTC time to the correct MATLAB serial date number in local time, accounting for Daylight Savings. This is done with the help of the C-function gmtime. Vectors are supported. The difference of the local time from UTC is also provided as an output.

Citar como

Abraham Cohn (2024). Get UTC Time, Convert a UTC time to Datenum (supports vectors, Win/Linux) (https://www.mathworks.com/matlabcentral/fileexchange/7244-get-utc-time-convert-a-utc-time-to-datenum-supports-vectors-win-linux), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2006a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Dates and Time en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0

By Request:
* Supports VECTORS
* No message to console (time zone diff is provided in 2nd output argument)
* Better help text for troubleshooting local time
* Includes compile script for Linux (mexCompile), courtesy of Nicholas Bercher