11
khampster
Re: Time zone problem...
  • 2005/1/31 5:01

  • khampster

  • Just popping in

  • Posts: 49

  • Since: 2005/1/19


where do i locate for this code? i havent checked... problem still not solved.. =\ its starting to annoy me.

12
ronhab
Re: Time zone problem...
  • 2005/1/31 7:19

  • ronhab

  • Friend of XOOPS

  • Posts: 160

  • Since: 2003/4/27


Just put that code in a file called time.php and drop it in your root directory and then go tohttp://yoursite.com/time.php and read the output.

13
khampster
Re: Time zone problem...
  • 2005/1/31 18:40

  • khampster

  • Just popping in

  • Posts: 49

  • Since: 2005/1/19


ok well i made the file and its in my root directory...

www.gotriceproductions.net/time.php

its gave me the time, and i tried to correct it.. still no good. its always like 14 hours off.. when i try to switch it to my central time zone.

14
Burnzy
Re: Time zone problem...
  • 2005/1/31 19:55

  • Burnzy

  • Just popping in

  • Posts: 75

  • Since: 2005/1/23


i had this problem and fixed it formy server. i though it was like in the atlantic but it was in central.

Well if its 14 hours off, make the server and default at your time. Then find out how many it is away. If its a new date... if its a day ahead then its ahead 14 hours. Then take ur Gmt from -6 to +8 try that and see what u get.

15
Burnzy
Re: Time zone problem...
  • 2005/1/31 19:57

  • Burnzy

  • Just popping in

  • Posts: 75

  • Since: 2005/1/23


is there a way on date() to do like -1 or +1 for the hour?

Then can u like in the forum date have it do pm and am and not army time?

16
ronhab
Re: Time zone problem...
  • 2005/1/31 20:06

  • ronhab

  • Friend of XOOPS

  • Posts: 160

  • Since: 2003/4/27


Your server looks like it is 11 hours off. You need to talk to the admin of the server.

The other three hours is probably the XOOPS timezone setting. It should be set to -8, as your server appears to be in the same time zone as California.

17
Burnzy
Re: Time zone problem...
  • 2005/1/31 23:28

  • Burnzy

  • Just popping in

  • Posts: 75

  • Since: 2005/1/23


can u make it so it shows like +1 or -1 in the hour anyone??? date() or sumthing....

18
DonXoop
Re: Time zone problem...

I don't get the problem, the server is on the west U.S. coast with DNS servers in Burnaby B.C. (Canada). XOOPS should have the server time zone set to PST(?) Then set the default time zone to the most common for the new users. The user sets the profile timezone to their local. Time should then be correct on the site.


19
Burnzy
Re: Time zone problem...
  • 2005/2/1 0:04

  • Burnzy

  • Just popping in

  • Posts: 75

  • Since: 2005/1/23


it should be that XOOPS just uses GMT time so u dont have to pick the server and default time. Just to pick the default time is what the time is. That simple. PHPBB does it and im sure its easy to see in the code.

20
kerrysl
Re: Time zone problem...
  • 2005/2/1 2:22

  • kerrysl

  • Just popping in

  • Posts: 21

  • Since: 2003/9/9 6


The problem is that code is not a timepiece. Simple program code cannot tell what time IT IS. It therefore needs the input of a time signal.

You basically have 3 choices for a time signal;
1. The time of the computer running as a server.
2. The time of the users computer
3. An external time signal.

Since your users can come from all over the place only options 1 and 3 are workable. The most common is option 1.

Even PHPBB will take the server time and use code that takes your Offset setting to correct to GMT. IF you don't supply the correct setting then you don't get the right time.

Xoops is no different.

So the steps are;
1. Read your server time with the php date() function running in a script on the server.
2. Calculate for yourself what this is offset from GMT.
3. Add that offset to the Server Time setting in Xoops.
4. IF most of your users are local to you, then set default to your local GMT offset. IF not set it to the expect timezone of the majority of users. Anonymous users will always see time based on this default.
(NOTE: My guess is that you have set Server and Default to the same offset. Therefore until you log in, your displayed times will be wrong.)
5. Set up your profile time offset for your local time zone.

Login

Who's Online

71 user(s) are online (54 user(s) are browsing Support Forums)


Members: 0


Guests: 71


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits