--- th_main_org.c	Thu Dec 30 07:32:20 2010
+++ th_main.c	Thu Dec 30 11:41:56 2010
@@ -186,6 +186,24 @@
 }
 
 /*
+** TH command:      datelocal
+**
+** Return a string which is the current time and date.
+*/
+static int datelocalCmd(
+  Th_Interp *interp, 
+  void *p, 
+  int argc, 
+  const char **argv, 
+  int *argl
+){
+  char *zOut = db_text("??", "SELECT datetime('now', 'localtime')");
+  Th_SetResult(interp, zOut, -1);
+  free(zOut);
+  return TH_OK;
+}
+
+/*
 ** TH command:     hascap STRING
 **
 ** Return true if the user has all of the capabilities listed in STRING.
@@ -349,6 +367,7 @@
     {"hascap",        hascapCmd,            0},
     {"htmlize",       htmlizeCmd,           0},
     {"date",          dateCmd,              0},
+    {"datelocal",     datelocalCmd,         0},
     {"html",          putsCmd,              0},
     {"puts",          putsCmd,       (void*)1},
     {"wiki",          wikiCmd,              0},
