Here are some improvements to timecheck page, updated to cover all changes in the latest patch:

  1. The dates are now formatted using Drupal's format_date() function, not the native php date() and gmdate()
  2. The server time now displays the offset, to highlight whether it is zero
  3. The old text 'London Time' is now 'Greenwich Mean Time', because UTC/GMT is the constant time but 'London Time' can vary according to daylight saving time in the UK. Obviously the original writer meant GMT not 'London Time'.
  4. For the local time I have added the timezone identifier, abbreviation and whether daylight-saving is in operation
  5. Removed the message about 'please have your Unix System Administrator fix ...' as we have no idea that this is relevant. The point of this page is just to give information, not demand any action.
  6. With timecheck now a tab at admin/config/content/scheduler/timecheck for legacy compatibility the old /scheduler/timecheck url can now redirect to the new tab
  7. Show the website default timezone description, code and offset from GMT
  8. Provide link for the admin to change the site timezone
  9. Add link for user to alter their own timezone (if that is allowed)
  10. Changed the access check from 'access administration pages' to the less-restrictive 'administer scheduler' to match the other scheduler admin tabs
  11. Add note to explain if the users timezone has not been saved yet

Comments

jonathan1055’s picture

Status: Active » Needs review
StatusFileSize
new3.48 KB

This patch has the old and new time values, as this may be useful when others are testing it.

jonathan1055’s picture

StatusFileSize
new94.02 KB

Here's a screen shot showing the new text.

timecheck new text

jonathan1055’s picture

StatusFileSize
new3.55 KB
new114.68 KB

Here's a better version which shows the website default timezone. I have added links for the admin to change the site timezone and for the user to alter their own timezone (if that is allowed). New screenshot attached.

I noticed that access to this page is for users who have 'access administration pages' permission. The other tabs are controlled via 'administer scheduler' permission. Just wondering if it would make sense to have these all the same, ie if the user can administer scheduler (but not the full site admin) then they should be allowed to see the timecheck page. It is read-only anyway.

jonathan1055’s picture

StatusFileSize
new4.8 KB
new121.08 KB

New patch with the following improvements:

  1. Display the website default code and offset in addition to the text description
  2. Add note to explain if the users timezone has not been saved yet - see #2293653: User timezone displayed but not saved - shows wrong timecheck
  3. Changed the access check from 'access administration pages' to the less-restrictive 'administer scheduler' to match the other scheduler admin tabs

enhanced timecheck tab

jonathan1055’s picture

StatusFileSize
new3.89 KB

Forgot to add the interdiff between #3 and #4

jonathan1055’s picture

StatusFileSize
new6.4 KB
new1.69 KB
new159.66 KB

This enhanced version adds a warning and highlights the User Timezone selection fieldset if the user has not saved their timezone. This will ease the confusion we discovered in #2293653: User timezone displayed but not saved - shows wrong timecheck.
User timezone not saved

jonathan1055’s picture

jonathan1055’s picture

Issue summary: View changes
jonathan1055’s picture

StatusFileSize
new5.99 KB

Existing patch no longer applied due to recent commits. Re-rolled against 7.x-1.2+18

pfrenssen’s picture

Just had a quick look. I think it's not the responsibility of the Scheduler module to "fix" the user profile form. This should be addressed in core. We are not the only module that needs timezone information, imagine if all modules that rely on the user's timezone would add their own messages and reshuffle the order of hook_form_alter() :)

Do you have a way of detecting whether the timezone was saved or not in the timecheck page? Maybe we can add the warning there, then we stay in our own realm.

jonathan1055’s picture

StatusFileSize
new4.42 KB

Yes, you are right - altering the user profile page is one step too far.

I already detect if the users timezone is not saved, and add a note to the Timecheck page (see point 2 in #4 above). Here's a patch without the user form changes.

jonathan1055’s picture

Issue summary: View changes

pfrenssen’s picture

Status: Needs review » Fixed
StatusFileSize
new2.7 KB

Looks good, I made some small tweaks to the strings, and replaced the link to the GMT site with a link to a google search showing the time inline, since the site looked a bit spammy.

Committed to 7.x-1.x, thanks!

jonathan1055’s picture

Thanks for the interdiff, very helpful. Good spot with the check_plain(), and yes adding a google search is more future-proof than linking to a specific site.

Status: Fixed » Closed (fixed)

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