summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd-3.20/0006-itu_r_tf_460_6.patch
blob: f2c814e1189294d5dc6581c59c5f373268219027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -Naru old/ntpshmwrite.c new/ntpshmwrite.c
--- old/ntpshmwrite.c	2021-03-01 05:18:28.833952716 -0600
+++ new/ntpshmwrite.c	2021-03-01 05:19:48.361954319 -0600
@@ -40,11 +40,18 @@
      * in Jun/Dec but may be in March or September
      */
     (void)gmtime_r( &(td->real.tv_sec), &tm);
+/* This code contradicts page 3 section 2.1 of ITU-R RV.460-6 that
+ * leap second may occur at the last second of a month, with
+ * preference for December and June, 2nd preference to March and
+ * September.
+ *  https://www.itu.int/dms_pubrec/itu-r/rec/tf/R-REC-TF.460-6-200202-I!!PDF-E.pdf
+ */
+#ifdef NOTITU_R_TF_460_6
     if ( 5 != tm.tm_mon && 11 != tm.tm_mon ) {
         /* Not june, not December, no way */
         leap_notify = LEAP_NOWARNING;
     }
-
+#endif /* NOTITU_R_TF_460_6 */
     /* we use the shmTime mode 1 protocol
      *
      * ntpd does this: