replace deprecated strftime() function
lint / lint (push) Successful in 21s Details

https://www.php.net/manual/en/function.strftime.php
This commit is contained in:
n 2024-03-30 21:59:38 +01:00
parent 9caeae5f32
commit 425c725443
3 changed files with 5 additions and 13 deletions

View File

@ -295,7 +295,7 @@ function addlog($url)
createfile("$File.csv");
}
$date = strftime("%d/%m/%Y", time());
$date = date_format(date_create(), "d/m/Y");
$string = sprintf("\"".$date."\",\"".iheure()."\",\"".$_SERVER["REMOTE_ADDR"]."\",\"".$_SERVER["HTTP_REFERER"]."\",\"".$_SERVER["HTTP_USER_AGENT"]."\"\n");

View File

@ -6,11 +6,7 @@ function settimer($TimerName, $String)
{
$FileTimerName = "modules/timers/$TimerName.csv";
if (strftime("%m", time()) < 10) {
$Date = strftime("%Y%0m%d%H%M%S", time());
} else {
$Date = strftime("%Y%m%d%H%M%S", time());
}
$Date = date_format(date_create(), "YmdHis");
$fp = fopen("$FileTimerName", "w+");
$Ligne = sprintf("\"".$Date."\",\"".$String."\"\n");
@ -26,11 +22,7 @@ function timer($TimerName, $TimerNb)
$FileTimerN = "modules/timers/$TimerName.csv";
if (strftime("%m", time()) < 10) {
$Date = strftime("%Y%0m%d%H%M%S", time());
} else {
$Date = strftime("%Y%m%d%H%M%S", time());
}
$Date = date_format(date_create(), "YmdHis");
if (!file_exists("$FileTimerN")) {
$timer = false;
@ -41,7 +33,7 @@ function timer($TimerName, $TimerNb)
fclose($fp);
$FileDate = $data[0];
$Date = strftime("%Y%m%d%H%M%S", time());
$Date = date_format(date_create(), "YmdHis");
$String = $data[1];

View File

@ -49,7 +49,7 @@ if (!(file_exists("modules/goldbook/$GoldbookFile.csv"))) {
// ajout des messages
if ($param == "postgb") {
if ($VMessage != "" && isset($_POST['piejacon'])) {
$date = strftime("%d/%m/%Y", time());
$date = date_format(date_create(), "d/m/Y");
$iheure = date("H:i");
$VMessage = ereg_replace("<", "&lt;", $VMessage);
$VMessage = ereg_replace(">", "&gt;", $VMessage);