datenum to UTC?
古いコメントを表示
Hi, I have
10-Oct-2013 15:59:00
and I need UTC time
1381435140
Is there any easy way? (time zone GTM-4)
Thanks!
1 件のコメント
Guillaume
2018 年 10 月 25 日
That's not UTC time, that's a Unix Time Stamp
It also appears that your input is a datetime not a datenum.
採用された回答
その他の回答 (1 件)
Yes, use datetime instead of datenum.
t = datetime('10-Oct-2013 15:59:00','timezone','-04:00')
t_unix = posixtime(t)
1 件のコメント
Peter Perkins
2018 年 10 月 31 日
'-04:00' is a valid time zone, but perhaps a little dangerous. It's a time zone that does not observe4 DST. If the OP is in, say, Boston, then that would give the wrong answer for 10-Nov. Something like 'America/New_York' is probably the right choice.
カテゴリ
ヘルプ センター および File Exchange で Time Series Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!