Project

General

Profile

1
<?php
2
  /**
3
  * QuickSkin Extension current_time
4
  * Print Current Time
5
  *
6
  * Usage Example:
7
  * Template: Time: {current_time:}
8
  * Result:   Time: 12:46:00
9
  *
10
  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
11
  */
12
  function qx_current_time ($meridiem='A') {
13
    global $_CONFIG;
14

    
15
    $timeFormat = 'g:i:s ' . $meridiem;
16
    if ( !empty($_CONFIG['time_format']) ) {
17
      $timeFormat = $_CONFIG['time_format'];
18
    }
19
    return date( $timeFormat );
20
  }
21

    
22
?>
(11-11/40)