I'm working with times in Matlab using datenum including milliseconds (datenum('2019-10-16 23:58:57.970') == 737714.999282060) and I want to get the same number in python but I get a different number (about 3 hours of error)
I know that datenum return days since year 1 and timestamp() returns seconds since 1970, so:
datenum1970 = 719529 #datenum('1970-01-01 00:00:00.0')
datenum_example_2 = 737714.999282060 #datenum('2019-10-16 23:58:57.970'), some date
d_example_2 = datetime(2019,10,16,23,58,57,970) #same date in datetime library
d_example_2_days = d_example_2.timestamp()/(24*3600) + datenum1970 # == 737715.1242708445
(d_example_2_days - datenum_example_2)*24 == 2.9997308291494846 # thats the error, about 3 hours
Other example gives 2.9998057410120964 of error (very similar but not equal, so I can't use the error as a constant to fix the problem)