Changeset 21801

Show
Ignore:
Timestamp:
10/14/07 07:53:05 (9 months ago)
Author:
GamerZ
Message:

For some reason date_i18n() produces some weird date

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-polls/trunk/polls/polls-logs.php

    r21734 r21801  
    299299                                    $pollip_ip = $poll_ip->pollip_ip; 
    300300                                    $pollip_host = $poll_ip->pollip_host; 
    301                                     $pollip_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_ip->pollip_timestamp); 
     301                                    $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp)); 
    302302                                    if($i%2 == 0) { 
    303303                                          $style = 'style=\'background-color: none\''; 
     
    327327                                    $pollip_ip = $poll_ip->pollip_ip; 
    328328                                    $pollip_host = $poll_ip->pollip_host; 
    329                                     $pollip_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_ip->pollip_timestamp); 
     329                                    $pollip_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_ip->pollip_timestamp));  
    330330                                    if($pollip_aid != $poll_last_aid) { 
    331331                                          if($pollip_aid == 0) { 
  • wp-polls/trunk/polls/polls-manager.php

    r21734 r21801  
    398398                              <td width="20%" valign="top"><strong><?php _e('Start Date/Time', 'wp-polls'); ?></strong>:</td> 
    399399                              <td width="80%"> 
    400                                     <?php echo date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_timestamp); ?><br /> 
     400                                    <?php echo mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_timestamp)); ?><br /> 
    401401                                    <input type="checkbox" name="edit_polltimestamp" id="edit_polltimestamp" value="1" onclick="check_polltimestamp()" />&nbsp;<label for="edit_polltimestamp"><?php _e('Edit Start Date/Time', 'wp-polls'); ?></label><br /> 
    402402                                    <?php poll_timestamp($poll_timestamp, 'pollq_timestamp', 'none'); ?> 
     
    410410                                                _e('This Poll Will Not Expire', 'wp-polls'); 
    411411                                          } else { 
    412                                                 echo date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_expiry); 
     412                                                echo mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry)); 
    413413                                          } 
    414414                                    ?> 
     
    487487                                          $poll_id = intval($poll->pollq_id); 
    488488                                          $poll_question = stripslashes($poll->pollq_question); 
    489                                           $poll_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll->pollq_timestamp); 
     489                                          $poll_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll->pollq_timestamp));  
    490490                                          $poll_totalvotes = intval($poll->pollq_totalvotes); 
    491491                                          $poll_totalvoters = intval($poll->pollq_totalvoters); 
     
    495495                                                $poll_expiry_text  = __('No Expiry', 'wp-polls'); 
    496496                                          } else { 
    497                                                 $poll_expiry_text = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_expiry); 
     497                                                $poll_expiry_text = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry));  
    498498                                          } 
    499499                                          if($i%2 == 0) { 
  • wp-polls/trunk/polls/polls.php

    r21734 r21801  
    348348      $poll_question_totalvotes = intval($poll_question->pollq_totalvotes); 
    349349      $poll_question_totalvoters = intval($poll_question->pollq_totalvoters); 
    350       $poll_start_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_question->pollq_timestamp); 
     350      $poll_start_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_question->pollq_timestamp));  
    351351      $poll_expiry = trim($poll_question->pollq_expiry); 
    352352      if(empty($poll_expiry)) { 
    353353            $poll_end_date  = __('No Expiry', 'wp-polls'); 
    354354      } else { 
    355             $poll_end_date  = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_expiry); 
     355            $poll_end_date  = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry)); 
    356356      } 
    357357      $poll_multiple_ans = intval($poll_question->pollq_multiple); 
     
    464464      $poll_question_totalvoters = intval($poll_question->pollq_totalvoters); 
    465465      $poll_question_active = intval($poll_question->pollq_active); 
    466       $poll_start_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_question->pollq_timestamp); 
     466      $poll_start_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_question->pollq_timestamp)); 
    467467      $poll_expiry = trim($poll_question->pollq_expiry); 
    468468      if(empty($poll_expiry)) { 
    469469            $poll_end_date  = __('No Expiry', 'wp-polls'); 
    470470      } else { 
    471             $poll_end_date  = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $poll_expiry); 
     471            $poll_end_date  = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $poll_expiry)); 
    472472      } 
    473473      $poll_multiple_ans = intval($poll_question->pollq_multiple); 
     
    844844                  $poll_totalvotes_zero = false; 
    845845            } 
    846                   $poll_start_date = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $polls_question['start']); 
     846                  $poll_start_date = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $polls_question['start'])); 
    847847                  if(empty($polls_question['end'])) { 
    848848                        $poll_end_date  = __('No Expiry', 'wp-polls'); 
    849849                  } else { 
    850                         $poll_end_date  = date_i18n(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), $polls_question['end']); 
     850                        $poll_end_date  = mysql2date(sprintf(__('%s @ %s', 'wp-polls'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', $polls_question['end']));  
    851851                  } 
    852852            // Archive Poll Header 
  • wp-polls/trunk/polls/wp-polls.pot

    r21734 r21801  
    33"Project-Id-Version: WP-Polls 2.22\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-10-13 15:18+0800\n" 
     5"PO-Revision-Date: 2007-10-14 15:52+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Lester Chan <gamerz84@hotmail.com>\n" 
  • wp-polls/trunk/readme.html

    r21734 r21801  
    289289                              <strong>Version 2.22 (01-01-2008)</strong> 
    290290                              <ul> 
    291                                     <li>NEW: Use date_i18n() For Localizing Date</li> 
    292291                                    <li>NEW: Use number_format_i18n() Instead</li> 
    293292                                    <li>FIXED: number_format() Not Used In Polls Archive</li>