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 | |
---|
1 | function 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 | |
---|
17 | if nargin == 1 |
---|
18 | shift = 2; |
---|
19 | end |
---|
20 | |
---|
21 | % For Matlab time is in days since 0/0/0000 |
---|
22 | t= datestr((sec+shift*3600)/86400 + 719529); |
---|
23 | % t= (sec+shift*3600)/86400 + 719529; |
---|
Note: See
TracBrowser
for help on using the repository browser.