Diff
checker
Texto
Texto
Imagens
Documentos
Excel
Pastas
Legal
Enterprise
Aplicativo para desktop
Preços
Fazer login
Baixar o Diffchecker Desktop
Comparar texto
Encontre a diferença entre dois arquivos de texto
Ferramentas
Histórico
Editor live
Recolher inalteradas
Sem quebra de linha
Layout
Dividido
Unificado
Nível de detalhe
Inteligente
Palavra
Caractere
Realce de sintaxe
Escolher sintaxe
Ignorar
Transformar texto
Ir à primeira mudança
Editar entrada
Diffchecker Desktop
A maneira mais segura de usar o Diffchecker. Obtenha o aplicativo Diffchecker Desktop: seus diffs nunca saem do seu computador!
Obter Desktop
Untitled diff
Criado
há 11 anos
O diff nunca expira
Limpar
Exportar
Compartilhar
Explicar
15 remoções
Linhas
Total
Removido
Caracteres
Total
Removido
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
58 linhas
Copiar tudo
21 adições
Linhas
Total
Adicionado
Caracteres
Total
Adicionado
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
63 linhas
Copiar tudo
<?php
<?php
$timezones = array(
$timezones = array(
'EST' => -5*3600, //equador
'EST' => -5*3600, //equador
'UTC' => 0, //london
'UTC' => 0, //london
'CCT' => +8*3600, //beijing
'CCT' => +8*3600, //beijing
'PST' => -8*3600, //los angeles
'PST' => -8*3600, //los angeles
);
);
foreach ($timezones as $time) {
foreach ($timezones as $time) {
$now = time();
$now = time();
$now += $time;
$now += $time;
print gmstrftime('DATE: %B %d %Y and TIME: %r <br/>',$now);
print gmstrftime('DATE: %B %d %Y and TIME: %r <br/>',$now);
}
}
$nowM = date('m');
$nowM = date('m');
$nowD = date('d');
$nowD = date('d');
$nowY = date('Y');
$nowY = date('Y');
$nowHr = date('h');
$nowHr = date('h');
$nowMin = date('i');
$nowMin = date('i');
$nowSec = date('s');
$nowSec = date('s');
?>
?>
<form action="homework2.php" method="post">
<form action="homework2.php" method="post">
<label>Sync Timecode</label>
<label>Sync Timecode</label>
<input type="text" name="month" placeholder="Month <?php $nowM ?>" value="<?php $nowM ?>" />
<input type="text" name="month" placeholder="Month <?php $nowM ?>" value="<?php $nowM ?>" />
<input type="text" name="day" placeholder="Day <?php $nowD ?>" value="<?php $nowD ?>" />
<input type="text" name="day" placeholder="Day <?php $nowD ?>" value="<?php $nowD ?>" />
<input type="text" name="year" placeholder="Year <?php $nowY ?>" value="<?php $nowY ?>" />
<input type="text" name="year" placeholder="Year <?php $nowY ?>" value="<?php $nowY ?>" />
<input type="text" name="hour" placeholder="Hours <?php $nowHr ?>" value="<?php $nowHr ?>" />
<input type="text" name="hour" placeholder="Hours <?php $nowHr ?>" value="<?php $nowHr ?>" />
<input type="text" name="min" placeholder="Minutes <?php $nowMin ?>" value="<?php $nowMin ?>"/>
<input type="text" name="min" placeholder="Minutes <?php $nowMin ?>" value="<?php $nowMin ?>"/>
<input type="text" name="sec" placeholder="Seconds<?php $nowSec ?>" value="<?php $nowSec ?>"/>
<input type="text" name="sec" placeholder="Seconds<?php $nowSec ?>" value="<?php $nowSec ?>"/>
<input type="submit" id="button">
<input type="submit" id="button">
</form>
</form>
<?php
<?php
Copiar
Copiado
Copiar
Copiado
$format = 'd-m-Y
h
:i:s';
$format = 'd-m-Y
H
:i:s';
$queryTime = $_POST['day'] . "-" .
$_POST['month']
. "-" . $_POST['year'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":" . $_POST['sec'];
$queryTime = $_POST['day'] . "-" .
date('m',strtotime(
$_POST['month']
))
. "-" . $_POST['year'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":" . $_POST['sec'];
if (date($format,strtotime($queryTime)) == $queryTime) {
if (date($format,strtotime($queryTime)) == $queryTime) {
Copiar
Copiado
Copiar
Copiado
$now = new DateTime(
strtotime($queryTime)
, new DateTimeZone('America/Los_Angeles'));
try {
$now = new DateTime(
date("c",
strtotime($queryTime)
));
} catch (Exception $e) {
echo $e->getMessage();
exit(1);
}
} else {
} else {
Copiar
Copiado
Copiar
Copiado
echo "You entered:
" . $queryTime . "<hr style='display:block;'>";
echo "You entered:
" . $queryTime . "<hr style='display:block;'>";
exit;
exit;
}
}
$timezones = array(
$timezones = array(
Copiar
Copiado
Copiar
Copiado
'EST' =>
new DateTimeZone(
'America/Panama'
)
,
'EST' =>
'America/Panama'
,
'UTC' =>
new DateTimeZone(
'Europe/London'
)
,
'UTC' =>
'Europe/London'
,
'CCT' =>
new DateTimeZone(
'Asia/Hong_Kong'
)
,
'CCT' =>
'Asia/Hong_Kong'
,
'PST' =>
new DateTimeZone(
'America/Los_Angeles'
)
,
'PST' =>
'America/Los_Angeles'
,
);
);
Copiar
Copiado
Copiar
Copiado
echo "You entered:
" . $now->format($format) . "<hr style='display:block;'>";
echo "You entered:
" . $now->format($format) . "<hr style='display:block;'>";
foreach ($timezones as $zone) {
foreach ($timezones as $zone) {
Copiar
Copiado
Copiar
Copiado
$now = new DateTime
($now,
new DateT
ime
Z
one
($zone));
date_timezone_set
($now,
t
ime
z
one
_open
($zone));
print
"The time in
" . $zone . "
is
" . $now->format($format
) . "<br/>";
echo
"The time in
" . $zone . "
is
" . $now->format($format
." \G\M\TP"
) . "<br/>";
}
}
?>
?>
Diferenças salvas
Texto original
Abrir arquivo
<?php $timezones = array( 'EST' => -5*3600, //equador 'UTC' => 0, //london 'CCT' => +8*3600, //beijing 'PST' => -8*3600, //los angeles ); foreach ($timezones as $time) { $now = time(); $now += $time; print gmstrftime('DATE: %B %d %Y and TIME: %r <br/>',$now); } $nowM = date('m'); $nowD = date('d'); $nowY = date('Y'); $nowHr = date('h'); $nowMin = date('i'); $nowSec = date('s'); ?> <form action="homework2.php" method="post"> <label>Sync Timecode</label> <input type="text" name="month" placeholder="Month <?php $nowM ?>" value="<?php $nowM ?>" /> <input type="text" name="day" placeholder="Day <?php $nowD ?>" value="<?php $nowD ?>" /> <input type="text" name="year" placeholder="Year <?php $nowY ?>" value="<?php $nowY ?>" /> <input type="text" name="hour" placeholder="Hours <?php $nowHr ?>" value="<?php $nowHr ?>" /> <input type="text" name="min" placeholder="Minutes <?php $nowMin ?>" value="<?php $nowMin ?>"/> <input type="text" name="sec" placeholder="Seconds<?php $nowSec ?>" value="<?php $nowSec ?>"/> <input type="submit" id="button"> </form> <?php $format = 'd-m-Y h:i:s'; $queryTime = $_POST['day'] . "-" . $_POST['month'] . "-" . $_POST['year'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":" . $_POST['sec']; if (date($format,strtotime($queryTime)) == $queryTime) { $now = new DateTime(strtotime($queryTime), new DateTimeZone('America/Los_Angeles')); } else { echo "You entered:" . $queryTime . "<hr style='display:block;'>"; exit; } $timezones = array( 'EST' => new DateTimeZone('America/Panama'), 'UTC' => new DateTimeZone('Europe/London'), 'CCT' => new DateTimeZone('Asia/Hong_Kong'), 'PST' => new DateTimeZone('America/Los_Angeles'), ); echo "You entered:" . $now->format($format) . "<hr style='display:block;'>"; foreach ($timezones as $zone) { $now = new DateTime($now, new DateTimeZone($zone)); print "The time in" . $zone . "is" . $now->format($format) . "<br/>"; } ?>
Texto alterado
Abrir arquivo
<?php $timezones = array( 'EST' => -5*3600, //equador 'UTC' => 0, //london 'CCT' => +8*3600, //beijing 'PST' => -8*3600, //los angeles ); foreach ($timezones as $time) { $now = time(); $now += $time; print gmstrftime('DATE: %B %d %Y and TIME: %r <br/>',$now); } $nowM = date('m'); $nowD = date('d'); $nowY = date('Y'); $nowHr = date('h'); $nowMin = date('i'); $nowSec = date('s'); ?> <form action="homework2.php" method="post"> <label>Sync Timecode</label> <input type="text" name="month" placeholder="Month <?php $nowM ?>" value="<?php $nowM ?>" /> <input type="text" name="day" placeholder="Day <?php $nowD ?>" value="<?php $nowD ?>" /> <input type="text" name="year" placeholder="Year <?php $nowY ?>" value="<?php $nowY ?>" /> <input type="text" name="hour" placeholder="Hours <?php $nowHr ?>" value="<?php $nowHr ?>" /> <input type="text" name="min" placeholder="Minutes <?php $nowMin ?>" value="<?php $nowMin ?>"/> <input type="text" name="sec" placeholder="Seconds<?php $nowSec ?>" value="<?php $nowSec ?>"/> <input type="submit" id="button"> </form> <?php $format = 'd-m-Y H:i:s'; $queryTime = $_POST['day'] . "-" . date('m',strtotime($_POST['month'])) . "-" . $_POST['year'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":" . $_POST['sec']; if (date($format,strtotime($queryTime)) == $queryTime) { try { $now = new DateTime(date("c",strtotime($queryTime))); } catch (Exception $e) { echo $e->getMessage(); exit(1); } } else { echo "You entered: " . $queryTime . "<hr style='display:block;'>"; exit; } $timezones = array( 'EST' => 'America/Panama', 'UTC' => 'Europe/London', 'CCT' => 'Asia/Hong_Kong', 'PST' => 'America/Los_Angeles', ); echo "You entered: " . $now->format($format) . "<hr style='display:block;'>"; foreach ($timezones as $zone) { date_timezone_set($now, timezone_open($zone)); echo "The time in " . $zone . " is " . $now->format($format." \G\M\TP") . "<br/>"; } ?>
Encontrar Diferença