Code:
$ ./s1 data2
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution : Debian 8.4 (jessie)
bash GNU bash 4.3.30
dateutils.dconv dconv 0.3.1
dateutils.ddiff ddiff 0.3.1
-----
Input data file data2:
2016-09-17 10:30:36 INFO: [D3B4AEB3] id: 4562079193, time: 2016-09-17 10:30:35, lat: 51.00000, lon: -112.00000, speed: 64.3, course: 130.0
2016-09-17 10:30:57 INFO: [D3B4AEB3] id: 4562079216, time: 2016-09-17 07:30:55, lat: 51.00000, lon: -112.00000, speed: 0.0, course: 0.0
2016-09-17 10:30:57 INFO: [D3B4AEB3] id: 4562079216, time: 2016-09-17 10:30:55, lat: 51.00000, lon: -112.00000, speed: 0.0, course: 0.0
2016-09-17 10:31:16 INFO: [D3B4AEB3] id: 4562079193, time: 2016-09-17 10:31:15, lat: 51.00000, lon: -112.00000, speed: 64.3, course: 130.0
-----
Results:
db, reference is :2016-09-17T10:30:36:, other is :2016-09-17T10:30:35:
db, Difference in time is :-1:
db, absolute value of :-1: is :1:
db, reference is :2016-09-17T10:30:57:, other is :2016-09-17T07:30:55:
db, Difference in time is :-10802:
db, absolute value of :-10802: is :10802:
2016-09-17 10:30:57 INFO: [D3B4AEB3] id: 4562079216, time: 2016-09-17 07:30:55, lat: 51.00000, lon: -112.00000, speed: 0.0, course: 0.0
db, reference is :2016-09-17T10:30:57:, other is :2016-09-17T10:30:55:
db, Difference in time is :-2:
db, absolute value of :-2: is :2:
db, reference is :2016-09-17T10:31:16:, other is :2016-09-17T10:31:15:
db, Difference in time is :-1:
db, absolute value of :-1: is :1: