Problem with timezone
  • 2005/11/2 8:06

  • sgshell

  • Just popping in

  • Posts: 94

  • Since: 2004/10/4

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?

Re: Problem with timezone
  • 2005/11/11 17:07

  • Fastian

  • Not too shy to talk

  • Posts: 156

  • Since: 2005/6/6 0

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
I m a Good Learner

Re: Problem with timezone
  • 2005/11/11 17:37

  • fosterm

  • Just popping in

  • Posts: 93

  • Since: 2005/8/7 2

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.


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.


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


Who's Online

129 user(s) are online (97 user(s) are browsing Support Forums)

Members: 0

Guests: 129



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

Latest GitHub Commits