source: MML/trunk/mml/links/tango/tangotime2matlab.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 483 bytes
Line 
1function t = tangotime2matlab(sec,shift)
2%TANGOTIME2MATLAB - Convert unix time to matlab time
3%
4%  INPUTS
5%  1. sec - Seconds since 1/1/1970
6%  2. shift - hour shift from GMT
7%
8%  OUTPUTS
9%  1. t = time as datastring
10%
11%  See also datestr
12
13
14% Written by Laurent S. Nadolski
15% TODO 2 hour shift is Okey only half the year
16
17if nargin == 1
18    shift = 2;
19end
20
21% For Matlab time is in days since 0/0/0000
22t= datestr((sec+shift*3600)/86400 + 719529);
23% t= (sec+shift*3600)/86400 + 719529;
Note: See TracBrowser for help on using the repository browser.