Is this module being ported to Drupal 6?

CommentFileSizeAuthor
#26 autotimezone.conversion.to.D6.patch8.15 KBicarus75

Comments

acker’s picture

I'd be interested in this too. Far too many of my users claim to be from Africa/Addis Ababa.

MichaelK-1’s picture

+1

fuzzy_texan’s picture

+1

moshe weitzman’s picture

I see some of this code in core already. May not be needed. See user_register().

wretched sinner - saved by grace’s picture

subscribe

webchick’s picture

...

hgmichna’s picture

Can anybody confirm that this module is no longer needed in Drupal 6?

v8powerage’s picture

This module should by in default installation since drupal 4…

darren oh’s picture

Category: feature » task

Drupal 6 automatically sets the site time zone during installation and sets the user’s time zone during registration. See

However, Drupal 6 does not update a user’s time zone when it changes. The JavaScript function Drupal.setDefaultTimezone is in user.js. Rather than setting the user’s time zone, it sets the default time zone on the installation and registration forms.

hgmichna’s picture

Category: task » feature
Priority: Critical » Minor

Thanks a lot for the good information. Very nice to hear that Drupal 6 has this built in.

If this is so, then the priority of this feature request cannot be high. I've changed the settings accordingly.

The feature request would actually be to automatically change the time zone when a user travels. But I'm not even sure whether that is actually desired. Perhaps we should let this issue die a peaceful death.

lomz’s picture

I do diagree, most people doenst travel that much (and keep surfing) but most countries have summer/winter-time and that makes this module super.

To acommodate the heavy travellers maybe there could be an option for disabling the update on a per-user-basis so that the few that travels enough to make this a problem could update the timeone themselves.

hgmichna’s picture

Priority: Minor » Normal

lomz, you are right. I overlooked the daylight saving time issue that is just hitting us now. Europe has already switched, one week ahead of America, and all time zone settings in all of my sites upgraded to Drupal 6 are now wrong or will be tomorrow.

What I don't understand is, if Drupal 6 already has the ability to detect the user's time zone, why is it not put to good use? This is a Drupal issue now.

Hans-Georg

lomz’s picture

Because they dont agree how to fix it, alot because of the mess in oceania...
So it would make me very happy if you could port it.

hgmichna’s picture

Sorry, but I'm a VB.NET, C#, and Java guy with very little PHP experience, not to mention knowledge of Drupal's programming hooks. I can't do it.

What mess in Oceania? If Auto Time Zone could detect the user's actual time, and Drupal itself can also do it during installation, where's the problem? Moreover, the user should always have the choice of disabling auto-detection.

lomz’s picture

They keep changing timezones, but yes if it is detected on the users computer that would solve that problem.

lomz’s picture

When does the module update timezone? every login or whenever visiting a page?

hgmichna’s picture

I don't know. But it does it often enough to work for travelling users.

If I had to program it, I'd do it once at the beginning of every session, which leaves the question of how to determine a session. Short of that, I'd do it once every hour, remembering each IP address for an hour. Doesn't Drupal keep track of users by IP address anyway? But these are just my ideas. I don't know how the module did it.

If the user's time is part of every HTTP request (I don't know if it is), then doing it for every page would also be feasible, but would be a slight performance drag.

lomz’s picture

a bit of a drag yes, anybody knows if the maintainer actually is maintaining?

hgmichna’s picture

Probably not, because the function is already partly in the Drupal 6 core and more details are being discussed for Drupal 7 in http://drupal.org/node/11077. That's a long thread, read the last few messages and perhaps #230.

lomz’s picture

But the updating-function isnt a part of 6.x, and it is a long time before 7.x comes...

hgmichna’s picture

True, but I fear that the author loses interest when he sees that the module is going into a dead-end street.

lomz’s picture

That is possible, or he can achieve having it in 7.x core?

hgmichna’s picture

No need to, because some people are hard at work to implement full-scale time and time zone handling in Drupal 7. See: http://drupal.org/node/11077

If they can make it, and it seems they can, the problem will be gone, but we still have the problem in Drupal 6. Who loves to program stopgap measures? (:-)

v8powerage’s picture

I think here's a huge misunderstanding, this module wasn't for setting daylight saving time, it was for automatically detecting where user is at the moment of login (not registration). I don't agree that people don't traveling much these times, I can tell you that I checked this module by myself going thru diff. timezones.

kevinsiji’s picture

I'm looking a module of exactly this kind. I need to display all my site times converted to the visitor's timezone (irrespective if they are registered users or anonymous). And as worldwide service provider, I've visitors to my site from most parts of the world. Is this feature there in the pipeline for Drupal 7? Hoping to have a solution at the earliest.

icarus75’s picture

Status: Active » Needs review
StatusFileSize
new8.15 KB

Don't fill up drupal.org's database with +1's and subscriptions. Use the following procedure instead:
1. Get yourself a nice cup of tea
2. Watch this video from webchick on porting drupal modules from D5 to D6 with the help of the coder module: http://www.lullabot.com/videocast/porting-drupal-modules
3. Install the coder module on a D6 test site [http://drupal.org/project/coder]
4. Run it against the autotimezone code
5. Apply changes where indicated. BTW: This is a very efficient way to learn about Drupal's internals.
6. Upload the patch
7. Iterate on other as-of-yet unported contrib modules you require
End of rant.

Cheers,
Bart.

fuzzy_texan’s picture

Would be nice if we didn't need to comment on an issue to be able to subscribe to it... seems like a very backwards method, but it's the only one we've got for now.

Thanks for the patch. I'll give it a go, and report back (we're not all coders, we can help in other ways though, like testing).

fuzzy_texan’s picture

Tested the patch in #27.

The module enables fine. It does advertise itself as 5.x.* on the modules list, but other than that there were no errors.

Tested logging with 2 different PC's with different time zones. Verified that post times were shown in the local time zone. Added a few comments and checked they showed up with the correct time zone.
Logged in on another PC with another time zone and verified the post times of the comments showed were time adjusted for the local time zone on that PC.

Edit: btw I haven't used this module before, so if I've made any mistakes in my assumptions of how it should work please let me know, so I can retest.

darren oh’s picture

Status: Needs review » Fixed

Updated in CVS commit 172596.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jordanmagnuson’s picture

In case anyone is looking for similar automatic timezone detection functionality in Drupal 7 (I know I was), I recently put together this module: http://drupal.org/project/timezone_detect