diff --git a/Smarty.class.php b/Smarty.class.php
index 4f551f90..c07768b5 100644
--- a/Smarty.class.php
+++ b/Smarty.class.php
@@ -643,6 +643,8 @@ class Smarty
}
$smarty['request'] = array_merge($smarty['request'], $smarty['session']);
+ $smarty['now'] = time();
+
$this->assign('smarty', $smarty);
}
diff --git a/demo/templates/index.tpl b/demo/templates/index.tpl
index 73c4f8a4..86615df8 100644
--- a/demo/templates/index.tpl
+++ b/demo/templates/index.tpl
@@ -9,6 +9,8 @@
Title: {#title#|capitalize}
{if #bold#}{/if}
+The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
+
Tooltip example: Move your mouse over the Help link to see an example of a tooltip using Smarty's popup function.
The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index 4f551f90..c07768b5 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -643,6 +643,8 @@ class Smarty
}
$smarty['request'] = array_merge($smarty['request'], $smarty['session']);
+ $smarty['now'] = time();
+
$this->assign('smarty', $smarty);
}
diff --git a/templates/index.tpl b/templates/index.tpl
index 73c4f8a4..86615df8 100644
--- a/templates/index.tpl
+++ b/templates/index.tpl
@@ -9,6 +9,8 @@
Title: {#title#|capitalize}
{if #bold#}{/if}
+The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
+
Tooltip example: Move your mouse over the Help link to see an example of a tooltip using Smarty's popup function.
The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}