Reply To: Calcutator keeps running and not showing price

It comes from this error message:
Fatal error: Call to undefined function strptime() in C:\domains\singsingvillasatbali.nl\wwwroot\wp\wp-content\plugins\easyreservations\easyReservations.php on line 463

Seems like windows don’t has this function. You can add this function to the beginning of easyReservations.php:

Select Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function strptime($date, $format) { 
    $masks = array( 
      '%d' => '(?P[0-9]{2})', 
      '%m' => '(?P[0-9]{2})', 
      '%Y' => '(?P[0-9]{4})', 
      '%H' => '(?P[0-9]{2})', 
      '%M' => '(?P[0-9]{2})', 
      '%S' => '(?P<S>[0-9]{2})', 
     // usw.. 
    ); 

    $rexep = "#".strtr(preg_quote($format), $masks)."#"; 
    if(!preg_match($rexep, $date, $out)) 
      return false; 

    $ret = array( 
      "tm_sec"  => (int) $out['S'], 
      "tm_min"  => (int) $out['M'], 
      "tm_hour" => (int) $out['H'], 
      "tm_mday" => (int) $out['d'], 
      "tm_mon"  => $out['m']?$out['m']-1:0, 
      "tm_year" => $out['Y'] > 1900 ? $out['Y'] - 1900 : 0, 
    ); 
    return $ret; 
  }

Regards