diff --git a/includes/common.inc b/includes/common.inc
index d7189ab..eeaac6f 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6408,6 +6408,9 @@ function drupal_common_theme() {
       'render element' => 'elements',
       'template' => 'region',
     ),
+    'datetime' => array(
+      'variables' => array('timestamp' => NULL, 'format_type' => NULL, 'custom' => NULL, 'pubdate' => FALSE),
+    ),
     'status_messages' => array(
       'variables' => array('display' => NULL),
     ),
diff --git a/includes/theme.inc b/includes/theme.inc
index 3ae5000..cefbfd3 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -1312,6 +1312,37 @@ function theme_disable($theme_list) {
  */
 
 /**
+ * Returns html for a date / time.
+ *
+ * @param $variables
+ *   An associative array containing:
+ *   - timestamp: The Unix style timestamp to be themed.
+ *   - format_type: The date format type to be used for the displayed date or
+ *     time, e.g. 'short', 'medium'.
+ *   - custom: The custom formatter to be used if 'format_type' is set to
+ *     'custom'.
+ *   - pubdate: (optional) A boolean value for the pubdate attribute, defaults
+ *     to FALSE.
+ */
+function theme_datetime($variables) {
+  $output = '<time';
+
+  if (empty($variables['custom'])) {
+    $variables['custom'] = '';
+  }
+
+  if (!empty($variables['pubdate'])) {
+    $output .= ' pubdate="pubdate"';
+  }
+
+  $output .= ' datetime="' . date_iso8601($variables['timestamp']) . '">';
+  $output .= format_date($variables['timestamp'], $variables['format_type'], $variables['custom']);
+  $output .= '</time>';
+
+  return $output;
+}
+
+/**
  * Returns HTML for status and/or error messages, grouped by type.
  *
  * An invisible heading identifies the messages for assistive technology.
