View | Details | Raw Unified | Return to bug 60846
Collapse All | Expand All

(-)docs/manual/mod/mod_autoindex.html.en (+7 lines)
Lines 856-861 Link Here
856
856
857
      </dd>
857
      </dd>
858
858
859
      <dt><a name="indexoptions.useolddateformat" id="indexoptions.useolddateformat">UseOldDateFormat</a></dt>
860
861
      <dd>The date format used for the <code>Last Modified</code> field was 
862
      inadvertently changed to <code>"%Y-%m-%d %H:%M"</code> from 
863
      <code>"%d-%b-%Y %H:%M"</code>. Setting this option will allow users to
864
      use the old date format.</dd>
865
859
      <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
866
      <dt><a name="indexoptions.versionsort" id="indexoptions.versionsort">VersionSort</a>
860
      (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
867
      (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
861
868
(-)docs/manual/mod/mod_autoindex.xml (+9 lines)
Lines 898-903 Link Here
898
      </highlight>
898
      </highlight>
899
      </dd>
899
      </dd>
900
900
901
      <dt><a name="indexoptions.useolddateformat"
902
               id="indexoptions.useolddateformat"
903
      >UseOldDateFormat</a></dt>
904
905
      <dd>The date format used for the <code>Last Modified</code> field was 
906
      inadvertently changed to <code>"%Y-%m-%d %H:%M"</code> from 
907
      <code>"%d-%b-%Y %H:%M"</code>. Setting this option will allow users to
908
      use the old date format.</dd>
909
901
      <dt><a name="indexoptions.versionsort"
910
      <dt><a name="indexoptions.versionsort"
902
               id="indexoptions.versionsort">VersionSort</a>
911
               id="indexoptions.versionsort">VersionSort</a>
903
      (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
912
      (<em>Apache HTTP Server 2.0a3 and later</em>)</dt>
(-)modules/generators/mod_autoindex.c (-4 / +12 lines)
Lines 144-149 Link Here
144
144
145
    char *ctype;
145
    char *ctype;
146
    char *charset;
146
    char *charset;
147
    char *datetime_format;
147
} autoindex_config_rec;
148
} autoindex_config_rec;
148
149
149
static char c_by_encoding, c_by_type, c_by_path;
150
static char c_by_encoding, c_by_type, c_by_path;
Lines 497-502 Link Here
497
        else if (!strncasecmp(w, "Charset=", 8)) {
498
        else if (!strncasecmp(w, "Charset=", 8)) {
498
            d_cfg->charset = apr_pstrdup(cmd->pool, &w[8]);
499
            d_cfg->charset = apr_pstrdup(cmd->pool, &w[8]);
499
        }
500
        }
501
        else if (!strncasecmp(w, "UseOldDateFormat", 16)) {
502
            d_cfg->datetime_format = "%d-%b-%Y %H:%M";
503
        }
500
        else {
504
        else {
501
            return "Invalid directory indexing option";
505
            return "Invalid directory indexing option";
502
        }
506
        }
Lines 656-661 Link Here
656
660
657
    new->ctype = add->ctype ? add->ctype : base->ctype;
661
    new->ctype = add->ctype ? add->ctype : base->ctype;
658
    new->charset = add->charset ? add->charset : base->charset;
662
    new->charset = add->charset ? add->charset : base->charset;
663
    new->datetime_format = add->datetime_format ? add->datetime_format : base->datetime_format;
659
664
660
    new->alt_list = apr_array_append(p, add->alt_list, base->alt_list);
665
    new->alt_list = apr_array_append(p, add->alt_list, base->alt_list);
661
    new->desc_list = apr_array_append(p, add->desc_list, base->desc_list);
666
    new->desc_list = apr_array_append(p, add->desc_list, base->desc_list);
Lines 1509-1514 Link Here
1509
    apr_pool_t *scratch;
1514
    apr_pool_t *scratch;
1510
    int name_width;
1515
    int name_width;
1511
    int desc_width;
1516
    int desc_width;
1517
    char *datetime_format;
1512
    char *name_scratch;
1518
    char *name_scratch;
1513
    char *pad_scratch;
1519
    char *pad_scratch;
1514
    char *breakrow = "";
1520
    char *breakrow = "";
Lines 1517-1522 Link Here
1517
1523
1518
    name_width = d->name_width;
1524
    name_width = d->name_width;
1519
    desc_width = d->desc_width;
1525
    desc_width = d->desc_width;
1526
    datetime_format = d->datetime_format ? d->datetime_format : "%Y-%m-%d %H:%M";
1520
1527
1521
    if ((autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING))
1528
    if ((autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING))
1522
                        == FANCY_INDEXING) {
1529
                        == FANCY_INDEXING) {
Lines 1756-1764 Link Here
1756
                    apr_time_exp_t ts;
1763
                    apr_time_exp_t ts;
1757
                    apr_time_exp_lt(&ts, ar[x]->lm);
1764
                    apr_time_exp_lt(&ts, ar[x]->lm);
1758
                    apr_strftime(time_str, &rv, sizeof(time_str),
1765
                    apr_strftime(time_str, &rv, sizeof(time_str),
1759
                                 "%Y-%m-%d %H:%M  ",
1766
                                 datetime_format,
1760
                                 &ts);
1767
                                 &ts);
1761
                    ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL);
1768
                    ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">", time_str, "  ", NULL);
1762
                }
1769
                }
1763
                else {
1770
                else {
1764
                    ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">&nbsp;" : ">&nbsp;", NULL);
1771
                    ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">&nbsp;" : ">&nbsp;", NULL);
Lines 1844-1851 Link Here
1844
                    apr_time_exp_t ts;
1851
                    apr_time_exp_t ts;
1845
                    apr_time_exp_lt(&ts, ar[x]->lm);
1852
                    apr_time_exp_lt(&ts, ar[x]->lm);
1846
                    apr_strftime(time_str, &rv, sizeof(time_str),
1853
                    apr_strftime(time_str, &rv, sizeof(time_str),
1847
                                "%Y-%m-%d %H:%M  ", &ts);
1854
                                datetime_format,
1848
                    ap_rputs(time_str, r);
1855
                                &ts);
1856
                    ap_rvputs(r, time_str, "  ", NULL);
1849
                }
1857
                }
1850
                else {
1858
                else {
1851
                    /*Length="1975-04-07 01:23  " (see 4 lines above) */
1859
                    /*Length="1975-04-07 01:23  " (see 4 lines above) */

Return to bug 60846