($yyyy, $mm, $dd) = ($date =~ /(\d+)-(\d+)-(\d+)/); $epoch_seconds = timelocal(0, 0, 0, $dd, $mm, $yyyy-1900); $strings = localtime($epoch_seconds);