View Issue Details

IDProjectCategoryView StatusLast Update
0011970mantisbtlocalizationpublic2010-05-31 15:10
Reporterleulima Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version1.2.0 
Summary0011970: Problem with datetime in brazillian portuguese format
Description

There are a problem with datetime in brazillian portuguese format when utilization of the PHP function strtotime(). The function return 0 to all format "d/m/Y H:i".

TagsNo tags attached.

Activities

leulima

leulima

2010-05-31 15:10

reporter   ~0025636

Suggestion for problem resolution.

Create a function in date_api.php for example:

/**

  • Get the date in integer representation
  • @param string $p_datetime
  • @return int date
  • @access public
    */
    function date_to_time( $p_datetime ) {
    $value = $p_datetime;
    if ( strpos( $value, '/' ) == 2 ) {
    $vlist = explode( ' ', $value );
    $vdate = explode( '/', $vlist[0] );
    $vtime = explode( ':', $vlist[1] );
    $value = mktime( $vtime[0], $vtime[1], 0, $vdate[1], $vdate[0], $vdate[2] );
    }
    else {
    $value = strtotime( $value );
    }
    return $value;
    }

Call date_to_time() in substitution strtotime().