diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index d90b999..ef4c7d4 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -1273,6 +1273,39 @@
     return keyStore->removeGrant(filename, granteeData) ? NO_ERROR : KEY_NOT_FOUND;
 }
 
+static ResponseCode getmtime(KeyStore*, int sock, uid_t uid, Value* keyName,
+        Value*, Value*) {
+    char filename[NAME_MAX];
+    encode_key_for_uid(filename, uid, keyName);
+    if (access(filename, R_OK) == -1) {
+        return (errno != ENOENT) ? SYSTEM_ERROR : KEY_NOT_FOUND;
+    }
+
+    int fd = open(filename, O_NOFOLLOW, O_RDONLY);
+    if (fd < 0) {
+        return SYSTEM_ERROR;
+    }
+
+    struct stat s;
+    int ret = fstat(fd, &s);
+    close(fd);
+    if (ret == -1) {
+        return SYSTEM_ERROR;
+    }
+
+    uint8_t *data;
+    int dataLength = asprintf(reinterpret_cast<char**>(&data), "%lu", s.st_mtime);
+    if (dataLength < 0) {
+        return SYSTEM_ERROR;
+    }
+
+    send_code(sock, NO_ERROR);
+    send_message(sock, data, dataLength);
+    free(data);
+
+    return NO_ERROR_RESPONSE_CODE_SENT;
+}
+
 /* Here are the permissions, actions, users, and the main function. */
 enum perm {
     P_TEST     = 1 << TEST,
@@ -1322,6 +1355,7 @@
     {del_key,    CommandCodes[DEL_KEY],    STATE_ANY,      P_DELETE,   {KEY_SIZE, 0, 0}},
     {grant,      CommandCodes[GRANT],      STATE_NO_ERROR, P_GRANT,    {KEY_SIZE, KEY_SIZE, 0}},
     {ungrant,    CommandCodes[UNGRANT],    STATE_NO_ERROR, P_GRANT,    {KEY_SIZE, KEY_SIZE, 0}},
+    {getmtime,   CommandCodes[GETMTIME],   STATE_ANY,      P_SAW,      {KEY_SIZE, 0, 0}},
     {NULL,       0,                        STATE_ANY,      0,          {0, 0, 0}},
 };
 
diff --git a/keystore/keystore.h b/keystore/keystore.h
index fe2ce56..f5e4439 100644
--- a/keystore/keystore.h
+++ b/keystore/keystore.h
@@ -63,12 +63,13 @@
     DEL_KEY = 16,
     GRANT = 17,
     UNGRANT = 18,
+    GETMTIME = 19,
 };
 
 typedef uint8_t command_code_t;
 
 // Taken: a b c d e f g h i j k l m n o p q r s t u v w x y z
-//        * *   * *   *   *   * * * *   *   * * * * *   *   *
+//        * * * * *   *   *   * * * *   *   * * * * *   *   *
 command_code_t CommandCodes[] = {
     't', // TEST
     'g', // GET
@@ -89,6 +90,7 @@
     'k', // DEL_KEY
     'x', // GRANT
     'y', // UNGRANT
+    'c', // GETMTIME
 };
 
 /**
