Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Time & Date Settings

Asked Modified Viewed 5,580 times
M
mstokens
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
asked
Junior Member

No matter which time offset I choose in the drop down in admin/time & date settings, the time doesn't change for new forum posts. User time offset is disabled, so time should be taken from the time offset setting... right?
Edited by mstokens on 03-08-2010 02:00,
0 replies

14 posts

F
Falcon
F
Falcon 10
  • Member, joined since
  • Contributed 128 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

After you selected the date, did you try to press the ">>" button then save ?
0 replies
M
mstokens
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

Falcon wrote:
After you selected the date, did you try to press the ">>" button then save ?


Yes, I've done that. My problem is that nothing changes as far as the actual time.

Example:

My server is in British Columbia and the time zone is Pacific Standard Time (PST). My current time & date is August 3 2010 06:04. After I choose my settings as shown the time is shown as August 2 2010 22:04.
mstokens attached the following file:
time.jpg [No information available / 0 Downloads]
0 replies
G
GMUDuckman
G
  • Senior Member, joined since
  • Contributed 266 posts on the community forums.
  • Started 6 threads in the forums
answered
Senior Member

edit haha my b... didn't read the original post ;-)
Edited by GMUDuckman on 03-08-2010 15:38,
0 replies
M
mstokens
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Junior Member

Those are the built-in PHPFusion codes so they should work.

PHP version is 5.2.11
0 replies
M
mpkossen
M
  • Senior Member, joined since
  • Contributed 267 posts on the community forums.
  • Started 4 threads in the forums
answered
Senior Member

Does it always display GMT? Did you try re-uploading all files?
0 replies
M
mstokens
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

mpkossen wrote:
Does it always display GMT? Did you try re-uploading all files?


Yes it does. I have re-uploaded the files.

One thing that I've discovered is if you enable the offset user field and a user chooses an offset... if you later on delete the user field the value remains in the database
0 replies
M
MTGap
M
MTGap 10
  • Junior Member, joined since
  • Contributed 17 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

I'm having the same problem, the time was correct before I tried to change the format and now the time isn't correct.

Strange thing is that when you apply the offset the time changes when you look in the drop down menus to the correct time, just no where else when you save.
Edited by MTGap on 04-08-2010 23:22,
0 replies
M
mstokens
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
answered
Junior Member

Quote

MTGap wrote:
Strange thing is that when you apply the offset the time changes when you look in the drop down menus to the correct time, just no where else when you save.


Same here.
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

Since user_offset in table users, is always set and has value 0, if user didn't set anything, maincore function show_date() will fail in v. 7.01.00.

// Format the date & time accordingly
function showdate($format, $val) {
   global $settings, $userdata;
   if (isset($userdata['user_offset'])) {
      $offset = $userdata['user_offset'];
   } else {
      $offset = $settings['timeoffset'];
   }
   if ($format == "shortdate" || $format == "longdate" || $format == "forumdate" || $format == "newsdate") {
      return strftime($settings[$format], $val + ($offset * 3600));
   } else {
      return strftime($format, $val + ($offset * 3600));
   }
}




A fix seems to be to exchange:

if (isset($userdata['user_offset'])) {



With:

if ($userdata['user_offset'] <> 0) {
0 replies
M
MTGap
M
MTGap 10
  • Junior Member, joined since
  • Contributed 17 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

Thanks, that makes sense.
0 replies
M
mpkossen
M
  • Senior Member, joined since
  • Contributed 267 posts on the community forums.
  • Started 4 threads in the forums
answered
Senior Member

user_offset should not be always set, since on new installations it should be disabled by default and therefore the database field shouldn't exist. However, if it does always exist, it indeed defaults to GMT. I'll fix this in SVN soon.
0 replies
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
answered
Veteran Member

If that was the intention, then you need to edit the following:


1.

In user_offset_include_var.php find:

$user_field_dbinfo = "";


Replace with:

$user_field_dbinfo = "char(5) NOT NULL DEFAULT '0'";



2.
In the users table, delete the core field user_offset


3.
In cookie_include.php find:

if ($userdata['user_offset'] <> 0) {


Replace with:

if (isset($userdata['user_offset'])) {


4.
In edit_profile.php find and delete:

$offset_list = "";
for ($i = -13; $i < 17; $i++) {
   if ($i > 0) { $offset = "+".$i; } else { $offset = $i; }
   $offset_list .= "<option".($offset == $user_data['user_offset'] ? " selected='selected'" : "").">".$offset."</option>\n";
}
0 replies
L
Lee77
L
Lee77 10
Commercial sig removed
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

Quote

WEC wrote:
If that was the intention, then you need to edit the following:


1.

In user_offset_include_var.php find:

$user_field_dbinfo = "";


Replace with:

$user_field_dbinfo = "char(5) NOT NULL DEFAULT '0'";



2.
In the users table, delete the core field user_offset


3.
In cookie_include.php find:

if ($userdata['user_offset'] <> 0) {


Replace with:

if (isset($userdata['user_offset'])) {


4.
In edit_profile.php find and delete:

$offset_list = "";
for ($i = -13; $i < 17; $i++) {
   if ($i > 0) { $offset = "+".$i; } else { $offset = $i; }
   $offset_list .= "<option".($offset == $user_data['user_offset'] ? " selected='selected'" : "").">".$offset."</option>\n";
}


I don't understand point number 2, Can explain to me? Thanks
0 replies
E
Eric83
E
Eric83 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.
answered
Newbie

Thanks. I was having the same problem. The

if ($userdata['user_offset'] <> 0) {

fix did the trick for me.
Edited by Eric83 on 06-09-2010 08:29,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 14 posts
  • Votes 0 votes
  • Topic users 8 members

8 participants

M
M
  • Senior Member, joined since
  • Contributed 267 posts on the community forums.
  • Started 4 threads in the forums
W
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
M
M
  • Junior Member, joined since
  • Contributed 31 posts on the community forums.
  • Started 6 threads in the forums
  • Started this discussions
F
F
Falcon 10
  • Member, joined since
  • Contributed 128 posts on the community forums.
  • Started 5 threads in the forums
M
M
MTGap 10
  • Junior Member, joined since
  • Contributed 17 posts on the community forums.
  • Started 4 threads in the forums
G
G
  • Senior Member, joined since
  • Contributed 266 posts on the community forums.
  • Started 6 threads in the forums
L
L
Lee77 10
Commercial sig removed
  • Newbie, joined since
  • Contributed 1 post on the community forums.
E
E
Eric83 10
  • Newbie, joined since
  • Contributed 1 post on the community forums.

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet