Time conversion from time_t format

  • Follow


I have data files time tagged with C standard "time_t" data structure, which I believe is just time in seconds after 1 Jan 1970 (I don't care about variations of leap seconds included).  I cannot find any direct Matlab conversion function that seems appropriate, or actual C coding to perform the conversion (only references to the C function call "ctime").  This seems like it should be a simple thing, but I can't find anything that works. 
0
Reply Brian 11/22/2010 6:36:04 PM

On Nov 23, 7:36=A0am, "Brian " <brian.edwa...@ll.mit.edu> wrote:
> I have data files time tagged with C standard "time_t" data structure, wh=
ich I believe is just time in seconds after 1 Jan 1970 (I don't care about =
variations of leap seconds included). =A0I cannot find any direct Matlab co=
nversion function that seems appropriate, or actual C coding to perform the=
 conversion (only references to the C function call "ctime"). =A0This seems=
 like it should be a simple thing, but I can't find anything that works.

Maybe you cannot find anything because it is simply one line:
t=3Ddatenum(1970,1,1) + ctime/86400;
0
Reply TideMan 11/22/2010 6:53:09 PM


1 Replies
777 Views

(page loaded in 5.044 seconds)

Similiar Articles:













7/23/2012 6:29:00 PM


Reply: