1
barryc
Xoops 2.2 and timezones
  • 2005/7/31 13:47

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


I have installed XOOPS 2.2 on a test server and am beginning to work with it, testing various modules that I use. I have installed both CBB 2.2rc and AMS. Both appear to be working, but I have noticed that both are showing the incorrect time. Both show a time 8 hours ahead of the default time set in XOOPS prefs. That would appear to be GMT. Server time is set to Mountain time (US) and default time is set to Pacific time (US).

This is probably something absurdly simple that I'm missing. Anyone have a suggestion?

[Edit] I was right! It was absurdly simple. What I stumbled on was the fact that the timezone for registered users was not shown in the reg. form (and edit form) by default. Making that visible showed that thte default was set to GMT, which I changed, and now the time shows correctly. I left this here in case anyone else has problems figuring it out.

Barry
Barry Cooper
Sweet Home, Oregon

2
neurophyre
Re: Xoops 2.2 and timezones
  • 2005/8/4 13:18

  • neurophyre

  • Just popping in

  • Posts: 4

  • Since: 2005/8/4 1


How did you change it? User timezones are not visible on registration or edit profile forms for me. I'm using the Extended Profiles module.

I have my Server timezone and Default timezone set right, but the users are all getting set to GMT.

If possible, I'd like to:

1. Give them the option, which isn't appearing on my forms for whatever reason.
2. Set the default to ESTEDT, because 95% of my users are in US/Eastern.

3
irmtfan
Re: Xoops 2.2 and timezones
  • 2005/8/4 13:56

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


how can i change default time zone? i cant change it see this bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=1250345&group_id=41586&atid=430840

4
barryc
Re: Xoops 2.2 and timezones
  • 2005/8/4 15:33

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Go to the admin menu. Choose Modules/Extended Profiles/Fields. Find the Time Zone field (timezone_offset). Click on edit. Make it visible. That makes it visible in the user profile form, where it can be set appropriately.

To me it is not a bug, although I think if would be better if that item were shown by default in the user profiles. XOOPS has always had the ability to set the time zone of the user independently of the server or site default time zone. Some sites (mine included) have users from all over the world.

Hope that helps,

Barry
Barry Cooper
Sweet Home, Oregon

5
Phatbloke
Re: Xoops 2.2 and timezones
  • 2005/8/5 5:50

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


I find this odd.

I assume the default time zone set in the prefs would mean all new users would be set to that unless they specifically changed it while registering. For me at the moment all new users are set to GMT making all times on the site 12 hours out since I'm in New Zealand and 99% of people using my site are in NZ. I would like the make the default timezone when signing up the same as default timezone in the site prefs.

I have temporarly worked around this buy saying my server is actually at GMT evening things up.

6
marijun
Re: Xoops 2.2 and timezones
  • 2005/8/5 7:50

  • marijun

  • Just popping in

  • Posts: 53

  • Since: 2004/6/4 1


i'm having a similar problem, but i haven't found a fix for it yet.

i have the timezone selectable and working in the extended profiles module, and i have the correct time zone set there and in the XOOPS settings. (server time zone as well). my server is in the -5:00 time zone, and i'm in the -6:00 time zone. in both the news module and my calendar module, the times are all in the server time zone. the offset doesn't seem to be working at all.
Marion Morris
Gravity Squared Media - The Science of Design
www.gravitysquared.com

7
barryc
Re: Xoops 2.2 and timezones
  • 2005/8/5 15:44

  • barryc

  • Just can't stay away

  • Posts: 480

  • Since: 2004/3/20


Presumably you are logged on when viewing those modules. What time zone is set in your profile?

Barry
Barry Cooper
Sweet Home, Oregon

8
marijun
Re: Xoops 2.2 and timezones
  • 2005/8/6 4:01

  • marijun

  • Just popping in

  • Posts: 53

  • Since: 2004/6/4 1


yep, i'm logged in and the correct time zone is set in my profile.

i think i figured it out. my module (as well as the news module, i suspect - my times are still an hour off in the news module) uses the time() function to grab the initial timestamp, which is being pulled from the server's time zone - not the user's. so i went through my module and changed all my time() functions to xoops_getUserTimestamp(time()) instead. it now pulls the correct date/time. then, to store it in the database, i changed it to userTimeToServerTime($startdatetime). now formatTimestamp is working as it should.

when i initially created this module, my server was in the same time zone as me and i must have overlooked the time zone situation.
Marion Morris
Gravity Squared Media - The Science of Design
www.gravitysquared.com

9
Mithrandir
Re: Xoops 2.2 and timezones

You have both the server's actual timezone, the timezone set in administration, the default timezone and the user's selected timezone. All can be very confusing if not used correctly - and "correctly" is a very contextual term.

Timezones are really tricky to work with. I surely remember long hours spent figuring these things out when making the server booking script (where I had both the user's timezone, the webserver's timezone AND the game server's timezone to take into consideration)

Glad you figured it out and thank you for sharing this with the community.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

10
neurophyre
Re: Xoops 2.2 and timezones
  • 2005/8/10 22:42

  • neurophyre

  • Just popping in

  • Posts: 4

  • Since: 2005/8/4 1


Thanks Barry. I agree that this needs to be shown by default when a new user is created. The current default of not showing it is unacceptable.

Further, there needs to be a way to change the default from GMT to something else for those webmasters who have sites with the majority of users from a particular time zone.

Login

Who's Online

236 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 236


more...

Donat-O-Meter

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

Latest GitHub Commits