Convert spectrogram time to UTC

Illustration
Vicente - 2020-12-05T14:23:20+00:00
Question: Convert spectrogram time to UTC

I have produced a spectrogram of a signal, starting at 18:33:01 UTC on 6th July 2013. I need the time to be in UTC rather than time instants; does anybody know how to convert this? 

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

starttime = datetime('18:33:01 UTC 6th July 2013', 'InputFormat', 'HH:mm:ss ''UTC'' dd''th'' MMMM yyyy', 'TimeZone', 'UTC');

event_times = starttime + seconds(t);
plot(event_times, ...)

One hopes that in reality you have your starting time in a format that is easier to parse: the above is a bit weak for the possibility of "1st" or "2nd" or "21st" or "22nd" or "23rd". 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!