Skip to content

Commit 1543ba7

Browse files
author
Marius Burkard
committed
- fixed autoresponder datetime validation in remote API
1 parent 26922bd commit 1543ba7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

interface/lib/classes/validate_autoresponder.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ function end_date($field_name, $field_value, $validator)
5252
//$start_date = $app->tform_actions->dataRecord['autoresponder_start_date'];
5353

5454
// Parse date
55-
$start_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$start_date);
56-
$end_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$field_value);
55+
$datetimeformat = (isset($app->remoting_lib) ? $app->remoting_lib->datetimeformat : $app->tform->datetimeformat);
56+
$start_date_array = date_parse_from_format($datetimeformat,$start_date);
57+
$end_date_array = date_parse_from_format($datetimeformat,$field_value);
5758

5859
//calculate timestamps
5960
$start_date_tstamp = mktime($start_date_array['hour'], $start_date_array['minute'], $start_date_array['second'], $start_date_array['month'], $start_date_array['day'], $start_date_array['year']);

0 commit comments

Comments
 (0)