from Get UTC Time, Convert a UTC time to Datenum (both Win32/Linux versions) by Nicolas BERCHER
Get a UTC time using standard C time function, convert UTC time to MATLAB serial date ...

utc2datenum.m
%UTC2DATENUM - Convert UTC time into a matlab serial date number.
%  UTC2DATENUM(UTC_TIME) should be the same as DATENUM(NOW)
%
% DN = UTC2DATENUM(TM)
%
% Input(s):
%  TM - UTC time value (see UTC_TIME)
%  TM is in units of seconds since 1-jan-1970 in UTC time not the local time zone
%
% Output(s):
%  DN - matlab serial date number
%  DN is in units of days since 1-jan-0000 in local time
%
% See Also: UTC_TIME, DATENUM

% Author(s): Abraham Cohn, March 2005

% Reference(s): http://www.cplusplus.com/ref/ctime/

% Copyright Philips Medical Systems.
error('MEX file required.');

Contact us at files@mathworks.com