Opened 18 years ago

Closed 18 years ago

#1473 closed patch (fixed)

Converting Modified Julian Dates

Reported by: dm@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: dvb Version:
Severity: low Keywords:
Cc: Ticket locked: no

Description

SVN 9297 added truncf to dvbdate2qt and that needed #include <math.h> to compile on my system. However, there's a much easier way to convert modified Julian dates since 1970 to Unix dates and that uses the fact that 1st January 1970 was MJD 40587. The attached patch should work. If it doesn't I need to change the MHEG code since I've used it there.

David.

Attachments (1)

mjd.patch (1.6 KB) - added by dm@… 18 years ago.

Download all attachments as: .zip

Change History (2)

Changed 18 years ago by dm@…

Attachment: mjd.patch added

comment:1 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [9302]) Closes #1473, by applying modified patch.

The algorithm Dave used in his patch didn't do the bcd to integer conversion for a few fields, but this uses the same concept to set dates post to Jan 1st 1970.

Note: See TracTickets for help on using tickets.