- Posts: 14031
- Thank you received: 4281
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Please Log in to join the conversation.
// Zunächst aktuelle Werte bestimmen $day = date("j"); $month = date("m"); $year = date("Y"); // Neuen EWert generieren mit gewünschter Zeit und um 1 erhöhtem Tag $newtime = mktime(4, 0, 0, $month, $day+1, $year);
Please Log in to join the conversation.
// 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); ?>
Please Log in to join the conversation.
// 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 } }
Please Log in to join the conversation.