Documenation
Time
/_plugins/time.php
Plug-in to format dates/times and adjust them to the user's time zone.
Example
1
2
3
2
3
<?php
echo $model->format_date(gmdate(), 'date');
?>
Class
$model->time
Public functions
-
$model->time->format_date ( string $date [, string $type ] )
Formats a date as $type (one of date, datetime (default) or time), adjusted to the user's time zone (default is GMT). Do not call this function directly, use$model->format_date()instead.
Public variables
-
$model->time->dateFormat
Date format. -
$model->time->timeFormat
Time format. -
$model->time->timeZone
The current user's time zone (default is GMT). -
$model->time->timeOffset
The difference in seconds between the user's time zone and GMT.