xoops forums

sgshell

Just popping in
Posted on: 2005/11/2 8:06
sgshell
sgshell (Show more)
Just popping in
Posts: 94
Since: 2004/10/4
#1

Problem with timezone

hi, do anyone know how to set the timezone correctly?

my server is in timezone GMT-6
but my location is GMT +8

when i set the server time zone in the system GMT -6 and the the default to GMT +8, it didn't show correctly the time in the site.

do anyone havethe same problem?

Fastian

Not too shy to talk
Posted on: 2005/11/11 17:07
Fastian
Fastian (Show more)
Not too shy to talk
Posts: 156
Since: 2005/6/6 0
#2

Re: Problem with timezone

I also have more or less the same issue.

I hope someone will see this thread and will give few guidelines on ho to get the correct time on your site when ur server time zone is different.
I m not a Programmer
BUT
I m a Good Learner

fosterm

Just popping in
Posted on: 2005/11/11 17:37
fosterm
fosterm (Show more)
Just popping in
Posts: 93
Since: 2005/8/7 2
#3

Re: Problem with timezone

Ditto here.

I have never had the time work correctly. Definately seems to be an issue(either with me or with XOOPS :)). Took the time off my site due to this issue.

Thanks
foz
Posted on: 2005/11/11 19:30
gediminasbyt
gediminasbyt (Show more)
Posts: 484
Since: 2005/3/18
#4

Re: Problem with timezone

Your server zone is my server is in timezone GMT-6
but my location is GMT +8 these are the settings for newly created users. When you create a user these are the settings that user gets by default after the changes are made. You probably created and are logging in with a user account that was created before this change therefore default settings were GMT GMT and these are the setting in your profile right now. In XOOPS 2.2.x go to profiles and adjust your timezone in userprofile. To get to this setting you might have to go to Modules->Extended profiles->Fields and enable timezone_offset in your profiles.

I'm sure you can adjust this setting in phpmyadmin I just did not even look at it.

Hope this helps.

Gediminas

seventhseal

Quite a regular
Posted on: 2005/11/11 20:31
seventhseal
seventhseal (Show more)
Quite a regular
Posts: 253
Since: 2004/8/7 2
#5

Re: Problem with timezone

Although the assumption on how he logged in might be correct, I had similar problems when I began relying on one of the calendar programs. I found the problem as discussed in this article. I was able to prove this theory by hardcoding values until I had pinpointed the issue and functions involved.

Bottom line, there is minor inconsistency between the way xoops_getUserTimestamp and userTimeToServerTime work. Although both functions do slightly different things, xoops_getUserTimesatmp is the one with the issue.

Since making the suggested change, all time is correct regardless of user TZ and server TZ. BTW, the problem was most noticable with anonymous users and logged-in users.

Hope this helps, and if anyone believes this is way off base, share the correction!
John Horne - a.k.a. - VelocityWebDev, Seventhseal, CreepingDeath
**********************************
VelocityWebDev Tech BLOG
VelocityWebHost Hosting and Design