[Xfce4-commits] [www/forum.xfce.org] 11/79: Store the time to avoid skipped days at 0:00:00.
noreply at xfce.org
noreply at xfce.org
Tue May 21 14:48:06 CEST 2019
This is an automated email from the git hooks/post-receive script.
s k u n n y k p u s h e d a c o m m i t t o b r a n c h o l d f o r u m
in repository www/forum.xfce.org.
commit a029c20b24644d5541800616e22215f11562841b
Author: Nick Schermer <nick at xfce.org>
Date: Fri Nov 12 18:36:00 2010 +0100
Store the time to avoid skipped days at 0:00:00.
---
include/sha256question.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/sha256question.php b/include/sha256question.php
index df75690..1c5101e 100644
--- a/include/sha256question.php
+++ b/include/sha256question.php
@@ -42,10 +42,11 @@ function sha256question_check()
// Because the user might be in a different time zone, or day changed right
// after submit, we also check the hash of yesterday and tomorrow.
+ $timstamp = time();
foreach (array (0, 1, -1) as $i)
{
// The date command adds a new line at the end
- $str = gmstrftime ($question_format, time() - ($i * 60*60*24)) ."\n";
+ $str = gmstrftime ($question_format, $timstamp - ($i * 60*60*24)) ."\n";
$answer = hash ("sha256", $str);
if (sha256question_normalize ($answer) == $user_answer)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list