Changes time from one format to another

Uses native DateTime class to change time formats. Read more.

php
fork add to bundle source
function change_time_format($input_time, $input_format, $output_format) { $dt = DateTime::createFromFormat($input_format, $input_time); return $dt->format($output_format); }

usage

load_function('change_time_format'); echo change_time_format('10.12.1984', 'd.m.Y', 'Y/m/d'); // 1984/12/10
← how to use this in app?
create log ...inout