- Posts: 15
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
// Aktuelle Zeit des Servers $aktuelleZeit = date("Y-m-d H:i:s"); // Zeitzone des Servers $serverZeitzone = date_default_timezone_get();
Please Log in to join the conversation.
<?php $aktuelleZeit = date("d.m.Y H:i:s"); $serverZeitzone = date_default_timezone_get(); echo "Aktuelle Zeit des Servers: ".$aktuelleZeit."<br/>"; echo "Zeitzone des Servers: ".$serverZeitzone."<br/>"; echo date("d.m.Y H:i",mktime(0,0,0,2,22,2024)) . "<br>"; echo date("d.m.Y H:i",mktime(4,0,0,5,16,2024)) . "<br>"; $day = date("j"); $month = date("m"); $year = date("Y"); $newtime = mktime(4, 0, 0, $month, $day+1, $year); echo "Soll 4:00 Uhr morgen früh sein: ".date("d.m.Y H:i",$newtime); ?>
// Cookies // Determine current date $currentday = date("j"); $currentmonth = date("m"); $currentyear = date("Y"); // Generate new value with desired time and day increased by 1 $midnight = mktime(1, 0, 0, $currentmonth, $currentday+1, $currentyear); if ($surveyActive && $this->aSurveyInfo['usecookie'] == "Y") { if (!$oSurvey->getHasTokensTable()) { setcookie("LS_" . $this->iSurveyid . "_STATUS", "COMPLETE", $midnight); //Cookie will expire at midnight } }