Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
user system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Jun 2007 at 05:02 UTC
Updated:
8 Aug 2007 at 17:53 UTC
Jump to comment: Most recent file
Comments
Comment #1
Gurpartap Singh commentedThere was a function name typo.
Comment #2
Gurpartap Singh commentedOops
Comment #3
Gurpartap Singh commentedRemoved inline code usage, and have set the Global Killswitch in $(document).ready(function() {..}); in other words: in favor of http://drupal.org/node/120360
Comment #4
Gurpartap Singh commentedThe title changes because we no more present timezone select field on user registration form, and no settings for it. The patch adds it silently to the registration form, it's a hidden field, and gets set in user_save upon submit.
Comment #5
m3avrck commentedI think this is fantastic idea and I've been using automatic timezone module for quite sometime.
The only problem I see though is in regards to DST and a user's offset will be affected when this happens. As a result, I think this check should happen more often than just user registration.
However, perhaps that DST patch goes in so maybe this is just superfluous talk...
Comment #6
Gurpartap Singh commentedRe-roll.
Comment #7
Gurpartap Singh commentedRe-roll.
Comment #8
dmitrig01 commentedyup
tested it
Comment #9
gábor hojtsyI see you removed the install time check function, but then I don't see where you added the call to the generic timezone setting function. Did I miss it or is it actually missing?
Comment #10
dmitrig01 commented*cough*
its there, in the patch
Comment #11
gábor hojtsyMaybe you could be a little bit more helpful?
Comment #12
Gurpartap Singh commentedThe killswitch for it is put in the JS file itself, in .ready(...). And user.js is already included in install.php after ChrisKennedy's password checker patch.
Comment #13
karens commentedRe our attempts to get real timezone handling into core (http://drupal.org/node/11077), is there any way to use javascript to detect the name of the timezone, not just the offset?
Comment #14
m3avrck commentedKaren, potentially, the JS date object returns the following:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_date
On my computer it says "EDT" -- I can't confirm what other computers say, but would that help?
Here are the rest of the date object methods, I don't think anything else is too useful: http://www.javascriptkit.com/jsref/date.shtml
Comment #15
karens commentedIn Firefox on Windows I get 'Fri Jun 29 2007 09:42:23 GMT-0500 (Central Daylight Time), which is possibly useful but doesn't really match anything in the timezone list. With IE 7 on Windows I only get 'Fri Jun 29 09:44:20 2007 ', which is no use at all. Sounds like there are lots of discrepancies.
How about country/city/continent info? The timezone database values look like: America/New York, or US/Central so maybe there's some way to get it that way, or at least to narrow down the possibilities.
Comment #16
m3avrck commentedHmm this seems to be the best thread on the subject: http://groups.google.ca/group/comp.lang.javascript/browse_frm/thread/c68...
And the other: http://www.merlyn.demon.co.uk/js-dates.htm#ST
After reading a bit, the best we could hope for is the offset + whether or not the user has daylight savings or not, not much else.
Comment #17
karens commentedHmmm, well thanks anyway for checking. Probably not much help.
Comment #18
Gurpartap Singh commentedRe-roll.
Comment #19
Gurpartap Singh commentedIs this going to get in? It's really a straight forward patch. A "really" useful addition...
Comment #20
gábor hojtsyHm, I think this could be a nice usability enhancement, so IMHO it is possibly to get into Drupal 6. But I don't understand what is going on around "the killswitch":
"The" killswitch is the
if (Drupal.jsEnabled)line. It is called a killswitch because if adequate JS support is not present in the browser, it does not run anything in the brackets. "The" killswitch does not set the timezone as the second comment says, neither it calls anything as said by the first comment excerpt.I don't think the code comments in this patch are right. Or am I mistaken?
Comment #21
Gurpartap Singh commentedSorry, I was mistaken. Will post updated patch after a few hours.
Comment #22
Gurpartap Singh commented/few hours/
Comment #23
Gurpartap Singh commentedP (CNR)
Comment #24
gábor hojtsyOK, this code was missing a configurable_timezones check, and I also reworded a comment a bit.
Committed the attached patch, thanks.
Comment #25
(not verified) commented