Changeset 5010 for branches/2.3/security/classes/funcoes_auxiliares.php
- Timestamp:
- 08/31/11 13:51:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/security/classes/funcoes_auxiliares.php
r5007 r5010 99 99 } 100 100 101 102 function data_hora ($valor) 103 { 104 $year = substr($valor, 0, 2); 105 $month = substr($valor, 2, 2); 106 $day = substr($valor, 4, 2); 107 $hour = substr($valor, 6, 2); 108 $min = substr($valor, 8, 2); 109 $sec = substr($valor, 10, 2); 110 return gmdate('YmdHis',gmmktime($hour, $min, $sec, $month, $day, $year)); 111 } 112 101 function data_hora($valor) 102 { 103 $aux = '00'.$valor; 104 return gmdate('YmdHis',data_hora_L($aux)); 105 } 106 107 function data_hora_L($valor) 108 { 109 $year = substr($valor, 2, 2); 110 $month = substr($valor, 4, 2); 111 $day = substr($valor, 6, 2); 112 $hour = substr($valor, 8, 2); 113 $min = substr($valor, 10, 2); 114 $sec = substr($valor, 12, 2); 115 return gmmktime($hour, $min, $sec, $month, $day, $year); 116 } 113 117 114 118 function gera_nome_arquivo_temporario($tab_arqs) … … 1744 1748 $dados['INICIO_VALIDADE'] = data_hora($cert_data[1][0][1][$KK][1][0][1]); 1745 1749 $dados['FIM_VALIDADE'] = data_hora($cert_data[1][0][1][$KK][1][1][1]); 1746 $agora = data_hora(date('y').date('m').date('d'). date('H').date('i').date('s'));1747 if( ($agora < $dados['INICIO_VALIDADE']) || ($agora > $dados['FIM_VALIDADE']))1750 $agora = data_hora(date('y').date('m').date('d').(date('H')).date('i').date('s')); 1751 if($agora < date("YmdHis",data_hora_L($dados['INICIO_VALIDADE'])) || $agora > date("YmdHis",data_hora_L($dados['FIM_VALIDADE']))) 1748 1752 { 1749 1753 $dados['EXPIRADO'] = true; … … 1756 1760 } 1757 1761 1758 1762 1759 1763 function AUTHORITYKEYIDENTIFIER($xx, $certificado_digital_formato_der) 1760 1764 {
Note: See TracChangeset
for help on using the changeset viewer.