diff options
Diffstat (limited to 'modules/user/user.js')
-rw-r--r-- | modules/user/user.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/user/user.js b/modules/user/user.js index bdfa06b43..aa5cf34a3 100644 --- a/modules/user/user.js +++ b/modules/user/user.js @@ -168,6 +168,14 @@ Drupal.evaluatePasswordStrength = function(value) { }; /** + * Set the client's system timezone as default values of form fields. + */ +Drupal.setDefaultTimezone = function() { + var offset = new Date().getTimezoneOffset() * -60; + $("#edit-date-default-timezone, #edit-user-register-timezone").val(offset); +}; + +/** * On the admin/user/settings page, conditionally show all of the * picture-related form elements depending on the current value of the * "Picture support" radio buttons. |