1 |
1546
|
Luisehahne
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
* QuickSkin Extension current_datetime
|
4 |
|
|
* Print Current Date and Time
|
5 |
|
|
*
|
6 |
|
|
* Usage Example:
|
7 |
|
|
* Template: Time: {current_datetime:}
|
8 |
|
|
* Result: Time: 01.01.2009 - 12:46:00
|
9 |
|
|
*
|
10 |
|
|
* @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
|
11 |
|
|
*/
|
12 |
|
|
function qx_current_datetime () {
|
13 |
|
|
global $_CONFIG;
|
14 |
|
|
|
15 |
|
|
$datetimeFormat = 'F j, Y H:i:s';
|
16 |
|
|
if ( !empty($_CONFIG['datetime_format']) ) {
|
17 |
|
|
$datetimeFormat = $_CONFIG['datetime_format'];
|
18 |
|
|
}
|
19 |
|
|
return date( $datetimeFormat );
|
20 |
|
|
}
|