mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Add the "format_timezone" helper function
This commit is contained in:
parent
98976ee382
commit
c3aca37591
1 changed files with 20 additions and 0 deletions
|
@ -164,4 +164,24 @@ if ( ! function_exists('format_date_time'))
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('format_timezone'))
|
||||
{
|
||||
/**
|
||||
* Format a timezone string based on the current app settings.
|
||||
*
|
||||
* @param string $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function format_timezone(string $value): string
|
||||
{
|
||||
/** @var EA_Controller $CI */
|
||||
$CI =& get_instance();
|
||||
|
||||
$CI->load->library('timezones');
|
||||
|
||||
return $CI->timezones->get_timezone_name($value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue