The following Matlab project contains the source code and Matlab examples used for utc to gps time coverter.
%UTC2GPS Convert UTC(GMT) time tags to GPS time accounting for leap seconds
% UTC2GPS(date) corrects an array of UTC dates(in any matlab format) for
% leap seconds and returns an array of GPS datenums where:
% GPS = UTC + steptime
% Currently step times are through Jan 1 2009, but need to be added below
% as they are instuted.