Commits

Anonymous committed 603ce2d

ip

  • Participants
  • Parent commits 4cfdd47

Comments (0)

Files changed (2)

 from google.appengine.api import users
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp.util import run_wsgi_app
-import re
+import datetime
 import time
-import datetime
+from datetime import datetime, timedelta, date
 
-
-import datetime
-import os
-import time
-
+def getCNnow():
+	return datetime.utcnow() + timedelta(hours=+8)
 
 def f(x,y):
 		list=[]
 	min = db.FloatProperty()
 	ip = db.StringProperty(multiline=True)
 	place = db.StringProperty(multiline=True)
-	time = db.DateTimeProperty(auto_now=True)
+	time = db.DateTimeProperty()
 
 
 
 			KCB.min=min([k for k in nkw])
 			KCB.ip =str(os.environ['REMOTE_ADDR'])
 			KCB.term=NowTerm.key()
+			KCB.time=getCNnow()
 			KCB.put()
 			self.redirect('/admin')
 		else:

File tpl/bingo.html

 {% for week in KCB.week  %}
 {{ week|floatformat:"2"}}s<font color="#088A08">|</font>
 {% endfor %}
-最差{{ KCB.min|floatformat:"2"}}s<font color="#088A08">|</font>最佳{{ KCB.max|floatformat:"2"}}s<font color="#088A08">|</font>平均{{ KCB.aver|floatformat:"2"}}s<font color="#088A08">|</font>{{ KCB.time|date:"Y年m月d日 H时i分"}}|在{{KCB.ip}}
+最差{{ KCB.max|floatformat:"2"}}s<font color="#088A08">|</font>最佳{{ KCB.min|floatformat:"2"}}s<font color="#088A08">|</font>平均{{ KCB.aver|floatformat:"2"}}s<font color="#088A08">|</font>{{ KCB.time|date:"Y年m月d日 H时i分"}}|在{{KCB.ip}}
 </h3>
 {% endfor %}
 	</font>