Jump to content

Results time stamp shows wrong time zone

Recommended Posts

When I view my auto test results ("Results" tab), the times usually appear to be GMT. But sometimes the correct time zone (PST) appears....sometimes not. Very strange. I don't see a pattern.

I'm in Calif. Is there a way to force it to always show PST?


Share this post

Link to post
Share on other sites

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 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...