30ea90f3a0e0f816e27053eb60fb401e2d045aec jcasper Wed Jan 29 16:59:58 2020 -0800 Public Sessions now orders most recent first by default. Ordering is also more granular (to the second instead of just to the day). refs #21228 diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c index 7aa8019..1f11cc4 100644 --- src/hg/hgSession/hgSession.c +++ src/hg/hgSession/hgSession.c @@ -339,34 +339,37 @@ int shared = atoi(row[1]); char *firstUse = row[2]; char buf[512]; boolean inGallery = FALSE; if (shared >=2) inGallery = TRUE; printf("<TR><TD> </TD><TD>"); struct dyString *dy = dyStringNew(1024); addSessionLink(dy, encUserName, encSessionName, FALSE, TRUE); printf("<a href=\"%s\">%s</a>", dyStringContents(dy), sessionName); dyStringFree(&dy); + struct tm firstUseTm; + ZeroVar(&firstUseTm); + strptime(firstUse, "%Y-%m-%d %T", &firstUseTm); char *spacePt = strchr(firstUse, ' '); if (spacePt != NULL) *spacePt = '\0'; printf(" </TD>" - "<TD><nobr>%s</nobr> </TD><TD align=center>", firstUse); + "<TD data-order=\"%ld\"><nobr>%s</nobr> </TD><TD align=center>", mktime(&firstUseTm), firstUse); char *dbIdx = NULL; if (startsWith("db=", row[3])) dbIdx = row[3]+3; else dbIdx = strstr(row[3], "&db=") + 4; if (dbIdx != NULL) { char *dbEnd = strchr(dbIdx, '&'); char *db = NULL; if (dbEnd != NULL) db = cloneStringZ(dbIdx, dbEnd-dbIdx); else db = cloneString(dbIdx);