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.

Edited time/date is in wrong time zone

edited November 2010 in Vanilla 2.0 - 2.8
Our server is in the UK. Vanilla Forums displays the correct time and date, but the text displayed by the plug-in is five hours behind.

I can't see any options where I can tell it about our time zone.


  • Options
    LincLinc Detroit Admin
    Timezone is per-user as the HourOffset field in the User table. The addon probably needs to be modified to take that into account.
  • Options
    I have the same problem, seems to be ignoring the offset
  • Options
    Maybe it will be fixed in the next version of Vanilla?
  • Options
    Still needs fixing.
  • Options

    No updates?

  • Options

    In class.lastedited.plugin.php line 65

    replace this

    'Date'      => Gdn_Format::ToDateTime(Gdn_Format::ToTimestamp($Data->DateUpdated)),

    with this

    'Date'      => Gdn_Format::ToDateTime(Gdn_Format::ToTimestamp($Data->DateUpdated) + GetValue('HourOffset', $UserData, T('Unknown User')) * 3600),

    Not sure if that's the most proper fix but it seems to work okay. CMIIW.

  • Options

    bram said:
    Not sure if that's the most proper fix but it seems to work okay. CMIIW.

    Oh thank god someone fixed this! I've been going through mySql (which I know nothing about) on Linux (which I know little about) trying to set timezones properly for quite a while now only to find out that nothing had any effect on the plugin. The last problem that remained on my forum has now been squashed... Thank you Bram! :) I downloaded the plugin when this wasn't answered yet and never checked back, now wasn't that a mistake? ;)

Sign In or Register to comment.