Skip to content

Commit 6606876

Browse files
committed
final
1 parent 70b679b commit 6606876

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "freezaweb/validator",
33
"description": "POST/GET/CUSTOM array validator",
44
"license": "proprietary",
5-
"version": "1.1.16",
5+
"version": "1.1.17",
66
"type": "library",
77
"authors": [
88
{

src/field_validate.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,14 @@ public function time(){
307307

308308
$this->format_to_string = true;
309309

310-
$format = 'H:i';
311-
310+
$format = 'H:i:s';
312311
$this->dateformat = $format;
313312

313+
if(strlen($this->input) == 5){
314+
$this->input.=':00';
315+
}
316+
317+
314318
$d = \DateTime::createFromFormat($format, $this->input);
315319

316320
if($d){

0 commit comments

Comments
 (0)