06c0276e636ee477a2a62187e066a89b230bb540
chmalee
  Mon Dec 17 15:51:35 2018 -0800
Table schema shows update time for bigBed file instead of table, refs #22619

diff --git src/hg/hgTables/bigBed.c src/hg/hgTables/bigBed.c
index 79ba740..1dfb4e1 100644
--- src/hg/hgTables/bigBed.c
+++ src/hg/hgTables/bigBed.c
@@ -345,42 +345,38 @@
 return idList;
 }
 
 void showSchemaBigBed(char *table, struct trackDb *tdb)
 /* Show schema on bigBed. */
 {
 /* Figure out bigBed file name and open it.  Get contents for first chromosome as an example. */
 struct sqlConnection *conn = NULL;
 if (!trackHubDatabase(database))
     conn = hAllocConn(database);
 char *fileName = bigBedFileName(table, conn);
 struct bbiFile *bbi = bigBedFileOpen(fileName);
 struct bbiChromInfo *chromList = bbiChromList(bbi);
 struct lm *lm = lmInit(0);
 struct bigBedInterval *ivList = getNElements(bbi, chromList, lm, 10);
+time_t timep = bbiUpdateTime(bbi);
 
 /* Get description of columns, making it up from BED records if need be. */
 struct asObject *as = bigBedAsOrDefault(bbi);
 
 hPrintf("<B>Database:</B> %s", database);
 hPrintf("&nbsp;&nbsp;&nbsp;&nbsp;<B>Primary Table:</B> %s ", table);
-if (!isHubTrack(table)  && hTableExists(database, table))
-    {
-    char *date = firstWordInLine(sqlTableUpdate(conn, table));
-    if (date != NULL)
-	printf("&nbsp&nbsp<B>Data last updated:&nbsp;</B>%s<BR>\n", date);
-    }
+printf("<B>Data last updated:&nbsp;</B>%s<BR>\n", firstWordInLine(sqlUnixTimeToDate(&timep, FALSE)));
 hPrintf("<B>Big Bed File:</B> %s", fileName);
 if (bbi->version >= 2)
     {
     hPrintf("<BR><B>Item Count:</B> ");
     printLongWithCommas(stdout, bigBedItemCount(bbi));
     }
 hPrintf("<BR>\n");
 hPrintf("<B>Format description:</B> %s<BR>", as->comment);
 
 /* Put up table that describes fields. */
 hTableStart();
 hPrintf("<TR><TH>field</TH>");
 if (ivList != NULL)
     hPrintf("<TH>example</TH>");
 hPrintf("<TH>description</TH> ");