]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Use ISO 8601 timeformats by default.
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 25 Nov 2013 12:44:07 +0000 (13:44 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 25 Nov 2013 12:44:07 +0000 (13:44 +0100)
conf/conf.c
doc/bird.sgml
sysdep/unix/config.Y

index 14225d3ba37ba011fa76c7983e9a62dfe41dd8f3..fc674ef32ed86159da14fda175efe5bce194254a 100644 (file)
@@ -96,7 +96,8 @@ config_alloc(byte *name)
   cfg_mem = c->mem = l;
   c->file_name = cfg_strdup(name);
   c->load_time = now;
-  c->tf_base.fmt1 = c->tf_log.fmt1 = "%d-%m-%Y %T";
+  c->tf_route = c->tf_proto = (struct timeformat){"%T", "%F", 20*3600};
+  c->tf_base = c->tf_log = (struct timeformat){"%F %T", NULL, 0};
 
   return c;
 }
index 52520a7e853b26a18ecd36c1395c74c713235f6d..269743d5a8febc97fc5d339c0bd0d03d87571d23 100644 (file)
@@ -380,7 +380,7 @@ protocol rip {
        "<m/format1/" is a format string using <it/strftime(3)/
        notation (see <it/man strftime/ for details). <m/limit> and
        "<m/format2/" allow to specify the second format string for
-       times in past deeper than <m/limit/ seconds. There are two
+       times in past deeper than <m/limit/ seconds. There are few
        shorthands: <cf/iso long/ is a ISO 8601 date/time format
        (YYYY-MM-DD hh:mm:ss) that can be also specified using <cf/"%F
        %T"/. <cf/iso short/ is a variant of ISO 8601 that uses just
@@ -388,11 +388,15 @@ protocol rip {
        the past) and the date format (YYYY-MM-DD) for far times. This
        is a shorthand for <cf/"%T" 72000 "%F"/.
 
-       By default, BIRD uses an short, ad-hoc format for <cf/route/
-       and <cf/protocol/ times, and a <cf/iso long/ similar format
-       (DD-MM-YYYY hh:mm:ss) for <cf/base/ and <cf/log/. These
-       defaults are here for a compatibility with older versions
-       and might change in the future.
+       By default, BIRD uses the <cf/iso short/ format for <cf/route/ and
+       <cf/protocol/ times, and the <cf/iso long/ format for <cf/base/ and
+       <cf/log/ times.
+
+       In pre-1.4.0 versions, BIRD used an short, ad-hoc format for
+       <cf/route/ and <cf/protocol/ times, and a <cf/iso long/ similar format
+       (DD-MM-YYYY hh:mm:ss) for <cf/base/ and <cf/log/. These timeformats
+       could be set by <cf/old short/ and <cf/old long/ compatibility
+       shorthands.
 
        <tag>table <m/name/ [sorted]</tag>
        Create a new routing table. The default routing table is
index 7bade9181fdd98236a23d416257efa6a7569f81d..1bba9a0d483113fb3aab1b184e36843bc5beab53 100644 (file)
@@ -14,7 +14,7 @@ CF_HDR
 CF_DECLS
 
 CF_KEYWORDS(LOG, SYSLOG, ALL, DEBUG, TRACE, INFO, REMOTE, WARNING, ERROR, AUTH, FATAL, BUG, STDERR, SOFT)
-CF_KEYWORDS(TIMEFORMAT, ISO, SHORT, LONG, BASE, NAME, CONFIRM, UNDO, CHECK, TIMEOUT)
+CF_KEYWORDS(TIMEFORMAT, ISO, OLD, SHORT, LONG, BASE, NAME, CONFIRM, UNDO, CHECK, TIMEOUT)
 
 %type <i> log_mask log_mask_list log_cat cfg_timeout
 %type <g> log_file
@@ -96,6 +96,8 @@ timeformat_spec:
  | timeformat_which TEXT expr TEXT { *$1 = (struct timeformat){$2, $4, $3}; }
  | timeformat_which ISO SHORT { *$1 = (struct timeformat){"%T", "%F", 20*3600}; }
  | timeformat_which ISO LONG  { *$1 = (struct timeformat){"%F %T", NULL, 0}; }
+ | timeformat_which OLD SHORT { *$1 = (struct timeformat){NULL, NULL, 0}; }
+ | timeformat_which OLD LONG  { *$1 = (struct timeformat){"%d-%m-%Y %T", NULL, 0}; }
  ;
 
 timeformat_base: