Can I force all users to have the same time zone by default?

Can I force all users to have the same time zone by default?

by Art Lader -
Number of replies: 6
I am having a little problem with the calendar, but I think know what is causing it. Many users have selected the wrong time zone in their profiles, and this seems to be messing up the calendar entries (wrong date, wrong time).

So, is there a simple way for me to do two things?

1. Change everyone's current setting to GMT -4.

2. Set GMT -4 as the default setting from now on.

Of course, users must retain the ability to change this setting as needed.

Thanks for any help you might be able to provide. wink

-- Art
Average of ratings: -
In reply to Art Lader

Re: Can I force all users to have the same time zone by default?

by W Page -
In reply to W Page

Re: Can I force all users to have the same time zone by default?

by Art Lader -
Thanks, WP!

You wouldn't know how to set up a cron job using Cpanel so that I could run that script on a regular basis, would you? Would the settings in the screen shot below work?

-- Art
Attachment timecron.png
In reply to Art Lader

Re: Can I force all users to have the same time zone by default?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I can set up that cron for you, Art.

But in general, it would be better to use:

   http://sitename.example.com/admin/timezone.php?zone=99

which sets everyone to use "Server Time", and then to set the "Server time" here:  Admin -> Configuration -> Variables.


In reply to Martin Dougiamas

Re: Can I force all users to have the same time zone by default?

by Art Lader -
Hi, Martin,

Sorry if I have been a pain, lately!

The server time is already set at GMT -4.

If you could set up the cron job for me (if necessary), I would appreciate it.

Thanks,
Art
In reply to Art Lader

Re: Can I force all users to have the same time zone by default?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Done - I made it daily.  Note that the cron job will daily reset any changes users may have made to their own timezone settings.
In reply to Martin Dougiamas

Re: Can I force all users to have the same time zone by default?

by Art Lader -
Thank you, Martin. smile

I know that this will be an inconvenience to users in other time zones, but having "wrong" dates in our school calendar is much worse!

-- Art