Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Houroffset troubles

edited January 2012 in Vanilla 2.0 - 2.8

I'm having a problem with the HourOffset being set to -368623 for some users when they login, using version 2.0.18.1

Is there a way to remove the HourOffset update? The data stored upon registration is correct, so this can be used to calculate the time.

Tagged:

Answers

  • Hate to bump, but I'm still having this problem. Anyone have any suggestions?

  • I commented out this section from class.usermodel.php, but I still get the 1969 dates.
    // Set the hour offset based on the client's clock. if (is_numeric($ClientHour) && $ClientHour >= 0 && $ClientHour < 24) { $HourOffset = $ClientHour - date('G', time()); $this->SQL->Set('HourOffset', $HourOffset); }

  • 422422 Developer MVP
    edited February 2012
  • What do you suggest I do with that @422 ?

  • 422422 Developer MVP

    It can be an issue within your ini , and your server.

    Theres a thread and possible fix here http://vanillaforums.org/discussion/16191/time-and-time-zone-configuration

    There was an error rendering this rich post.

  • I added the ini setting for the time zone as mentioned above, but it didn't work. Every time a user logs out, then back in, the dates display as 1969.

    I'm about ready to give up on Vanilla forums and convert to something else. :-(

  • 422422 Developer MVP
    edited February 2012

    Not sure, but coud be a server issue ask @x00 he is good at this kinda stuff

    There was an error rendering this rich post.

  • x00x00 MVP
    edited February 2012

    Ah the dreaded unix epoch overrun.

    grep is your friend.

  • I'm about ready to give up on Vanilla forums and convert to something else. :-(

    I think you are being unnecessarily harsh on vanilla forums, with what is a general problem. Seriously if you want to quit, then quit, but I think you are throwing the toys out of the pram.

    grep is your friend.

  • x00x00 MVP
    edited February 2012

    I take it you restarted your server?

    Can you SELECT HourOffset FROM GDN_User WHERE HourOffset > 17 and give us a sample. I doubt this is the problem, but we'll see.

    Try

    SELECT DateInserted FROM GDN_Discussion WHERE DateInserted > -1 Order By DateInserted ASC LIMIT 5

    grep is your friend.

  • edited February 2012

    Thanks for your interest in this @x00

    I am not being harsh - I want to use Vanilla, but the date reverting to 1969 every time a user logs out and back in is a big issue for them. Running a cron job multiple times a day to reset the HourOffset value is an inefficient bandaid, and doesn't catch every login.

    Here are the results from the queries you posted above....note that I added one for the huge negative values which result in the display of 1969.

    SELECT HourOffset FROM GDN_User WHERE HourOffset > 17

    21

    21

    19

    SELECT HourOffset FROM GDN_User WHERE HourOffset < -5

    -369196

    -369199

    -369199

    -369195

    SELECT DateInserted FROM GDN_Discussion WHERE DateInserted > -1 Order By DateInserted ASC LIMIT 5

    2011-09-27 21:52:33

    2011-09-28 23:24:28

    2011-10-13 21:57:22

    2011-10-20 14:44:16

    2011-10-20 14:44:46

  • ToddTodd Chief Product Officer Vanilla Staff

    I've never seen this problem before.

    Do you have jQuery or any other client-side debugging tools? I'd like to see what is going into the set hour offset code. I'll come up with a patch to protect about hour offsets greater than a day though.

  • @Todd Thanks for offering to help! The jQuery firefox addon doesn't show any errors popping up when signing on. We did have Vanilla embedded into Wordpress, but got rid of that today and were saddened to discover this problem still persists. Any assistance you can offer to get rid of these large negative numbers on the HourOffset would be greatly appreciated.

  • @jrav I've been having some similar issues, and we have a discussion going over here: http://vanillaforums.org/discussion/comment/157575 which might provide some help for you. Some really helpful members have shared ideas and code...

Sign In or Register to comment.