Jump to content

Results time stamp shows wrong time zone


rrr10

Recommended Posts

Sorry it's not working properly for you.  Do you have cookies enabled?  Pretty sure that's the issue.

 

I can see how I can improve that and remove the dependency of that cookie.  It's actually already partially built in.  Currently your time zone offset is detected with javascript, it then sets a cookie (I call GMT_bias).  This cookie in turn triggers a database call to action where it saves that setting to a database... it continues to check your timezone in case it changes and will then update that database setting.  The actual setting is supposed to be read from the database but there was an error in the code that was causing that variable to be cleared.

 

The cookie is actually left over from previous versions, before it saved that to a database.  It can be rewritten to save the setting without the cookie.

 

What I think happened on your machine is that you may have disabled cookies or blocked TMN's cookies.  This is the only instance I could see where the bug was noticeable... it erased your offset and set you to the base time of GMT.

 

I was able to reproduce this by blocking TMN's cookies in Firefox.

 

Screen Shot 2019-01-28 at 1.11.36 AM.png

 

I then unblocked cookies and refreshed the page twice... the first page load captures and sets the cookie and then on the subsequent page loads the GMT bias is set properly.

 

(this is my real time, loaded after re-enabling cookies)

Screen Shot 2019-01-28 at 1.11.51 AM.png

 

But, it really shouldn't have done that.  It's supposed to look to the database setting.  I pulled your settings table up in the database and it was showing GMT-7... doubled checked mine and it was still set to GMT-7.  I then realized that it was being unset because of an overlooked statement... something that ran in my head when I wrote it but closer inspection showed that under THIS circumstance... it will essentially clear the setting.  I actually never expected people to disable cookies, when it was originally written I don't think browsers even offered that.

 

The statement has been fixed.

 

So now, as long as you've previously set the cookie it will remember your setting properly in the database and even if you disable cookies it will work as it should.  If you haven't already set the cookie before, then it won't work right now.  You'll be set to the default, GMT.  But it's noted on my list and I'll make sure that's rewritten to to remove the cookie dependency.  It's no longer necessary, it was a hack to begin with.  :-P 

Link to comment
Share on other sites

×
×
  • Create New...