Get UTC Time, Convert a UTC time to Datenum (both Win32/Linux versions)
by Nicolas BERCHER
20 Jun 2006
(Updated 20 Jun 2006)
Get a UTC time using standard C time function, convert UTC time to MATLAB serial date ...
|
Watch this File
|
| File Information |
| Description |
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, there is no adjustment in this number for 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. This is done with the help of the C-function gmtime. Because this function should properly handle daylight savings time adjustments going from UTC to the local time used by the MATLAB serial date number.
This package just brings a Linux compatibility. |
| Acknowledgements |
The author wishes to acknowledge the following in the creation of this submission:
Get UTC Time, Convert a UTC time to Datenum (supports vectors, Win/Linux)
This submission has inspired the following:
Convert Time Array to a Datenum Array (Win32)
|
| MATLAB release |
MATLAB 7.0.1 (R14SP1)
|
| Other requirements |
Available for Win32 and Linux platforms. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 21 Jun 2006 |
Richard Sonnenfeld
|
|
|
| 07 Mar 2007 |
Colin Foss
|
|
|
|
Contact us at files@mathworks.com