BUG/MINOR: clock: fix the boot time measurement method for 2.6 and older

clock_update_date() changed between 2.6 and 2.7, it used to always
update now_ms prior to 2.7 while it doesn't anymore later if not
relevant. As such, calling it to measure the boot time causes the
backport in commit a2e5d62d58 ("MINOR: clock: measure the total boot
time") to still apply the offset between date and now_ms, in addition
to the extra delay, resulting in the double time for the checks and
still the well-known symptoms of desynched clocks in "show sess all".
Updating "date" only using a regular gettimeofday() is much more
reliable here apparently. This is only for 2.6 and 2.4.

(cherry picked from commit f5272a003e8ae38cc046253eb58410fde4c8bde3)
[wt: adjusted ctx for 2.4: replaced tv_update_date() instead]
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/haproxy.c b/src/haproxy.c
index 13085d9..dd1130d 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -1962,14 +1962,14 @@
 	/* update the ready date that will be used to count the startup time
 	 * during config checks (e.g. to schedule certain tasks if needed)
 	 */
-	tv_update_date(0, 1);
+	gettimeofday(&date, NULL);
 	ready_date = date;
 
 	/* Note: global.nbthread will be initialized as part of this call */
 	err_code |= check_config_validity();
 
 	/* update the ready date to also account for the check time */
-	tv_update_date(0, 1);
+	gettimeofday(&date, NULL);
 	ready_date = date;
 
 	for (px = proxies_list; px; px = px->next) {
@@ -3179,7 +3179,7 @@
 	}
 
 	/* update the ready date a last time to also account for final setup time */
-	tv_update_date(0, 1);
+	gettimeofday(&date, NULL);
 	ready_date = date;
 
 	if (global.mode & (MODE_DAEMON | MODE_MWORKER | MODE_MWORKER_WAIT)) {