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.
time difference
jackmaessen
✭✭✭
Can someone explain me why there is a time difference of 1 hour in the discussions and comments when you are logged in and logged out?
Look at the time in the meta: Started by jackmaessen ...time xx:xx
Log out and look to the time again; 1 hour difference
The time in the database is the same as when being logged out, but that is the wrong time. The right time is displayed when you are logged in.
0
Comments
When you are logged out, times are in UTC. When you are logged in, it uses your local timezone.
@jackmaessen You can change the 'guest' timezone via a configuration if most of your users are in a specific timezone. Add this to your
/conf/config.php
file:You can use any string from this list: http://php.net/manual/en/timezones.php
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
hgtonight,
But what if the resource is in a certain time zone, and visitors from different time zones? Probably better to bind to the PC user and not to the server where the resource is located? It's just a suggestion :-)
We do not currently session guests, and therefore have no capacity to detect and store the timezone of a user who is not logged in. Also, we are not binding you to the timezone of the server (which should always be using UTC) but rather to the timezone of your choosing in the config.
OK, now it is clear, thanks
How is possible that suddenly appears russian language above?
@Linc написал:
Also here, several comments in russian language: http://vanillaforums.org/profile/kopna
It's a deficiency in Multilingual. Activity (and quoting) is created in the language of the triggering user.
Did it work for you? For me, the time is only accurate when viewed in the recent discussion/index page. The time is still ahead when viewing the actual comment after clicking the discussion.
Maybe it depends on the following factors:
1: This forum established plugin - Multilingual. Аnd a file(class.multilingual.plugin ) was modified following lines:
protected function GetAlternateLocale() {
$Locale = FALSE;
// User preference
if (!$Locale) {
$Locale = $this->GetUserMeta(Gdn::Session()->UserID, 'Locale', TRUE);
$Locale = GetValue('Plugin.Multilingual.Locale', $Locale, FALSE);
}
// Query string
if (!$Locale) {
$Locale = $this->ValidateLocale(GetValue('locale', $_GET, FALSE));
if ($Locale)
Gdn::Session()->Stash('Locale', $Locale);
}
// Session
if (!$Locale) {
$Locale = Gdn::Session()->Stash('Locale', '', FALSE);
}
return $Locale;
}
If the operating system user Ukrainian or Russian, the plugin automatically displays the translation in the language used by the user.