Im System ist eben alles richtig. PHP sagt, die Sommerzeit sei aktiv. In den INI-Dateien ist keine datetime konfiguriert. timedatectl status:

timedatectl status

              Local time: Mi 2024-03-27 17:19:44 -04

          Universal time: Mi 2024-03-27 21:19:44 UTC

                RTC time: Mi 2024-03-27 21:19:44

               Time zone: America/Asuncion (-04, -0400)

System clock synchronized: yes

             NTP service: active

         RTC in local TZ: no

Aber PHP sagt eben:

php > var_dump(new Datetime());

object(DateTime)#1 (3) {

 ["date"]=>

 string(26) "2024-03-27 18:20:06.689363"

 ["timezone_type"]=>

 int(3)

 ["timezone"]=>

 string(15) "America/Halifax"

}

php >

Ist irgendein komischer PHP-Fehler. Ich kann ihn ganz einfach umgehen, indem ich die Zeitzone in der ini-Datei oder im PHP-Skript selber manuell einstelle, aber es wäre halt schön, wenn PHP das selber machen würde.

...zur Antwort
<link rel="stylesheet" href="style.css">
<?php
$db = unserialize(file_get_contents('data.php'));
if($db == false){
        $db = array();
}
if($_POST['mail'] == ''){
        if($_POST['name'] == ''){
                if($_POST['pass'] == ''){
                        if(!array_key_exists($_POST['mail'], $db)){
                                $db[$_POST['mail']] = [$_POST['name'], []];
                                file_put_contents('data.php', serialize($db));
                        } 
                }
        }
}
?>
<form action="" method="post">
    <center>
        <label for="firma_name" >name:</label><br>
        <input type="text" class="input" name="name" autocomplete="off"><br>
        <label for="produkte">email:</label><br>
        <input type="text"  class="input" name="mail" autocomplete="off"><br>
        <label for="adresse">pass:</label><br>
        <input type="text"  class="input" name="pass" autocomplete="off"><br>
        <input type="submit" class="anmelde_button" value="anmelden">
    </center>
</form>
...zur Antwort
Weitere Inhalte können nur Nutzer sehen, die bei uns eingeloggt sind.