News:

Join the Facebook Fan Page.

Main Menu

Reset users timezones

Started by Pyrhel, February 12, 2022, 12:14:55 PM

Previous topic - Next topic

Pyrhel

I saw in the admin page I can disable customizing timezone by the users and to set a default one. But is there a way to reset already set timezones?

Pyrhel

I did it by updating the DB:
update smf_users set timezone = 'prefered timezone here'

shawnb61

There has got to be a better way...  Submitted an enhancement request:
https://github.com/SimpleMachines/SMF2.1/issues/7324
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

jsx

Quote from: Pyrhel on February 12, 2022, 12:14:55 PMI saw in the admin page I can disable customizing timezone by the users and to set a default one.

Where exactly in the admin panel can I find this function?

Doug Heffernan

Quote from: jsx on April 21, 2022, 06:01:03 AMWhere exactly in the admin panel can I find this function?

You can set a default time zone by going to Configuration->Features and Options->Forum default timezone.

jsx

A user on the Polish SMF 2.1 support forum wrote that he updated the forum from SMF 2.0.x to 2.1 and set the correct timezone in Forum default timezone, but all users have the default time zone set to: UTC Coordinated Universal Time - the correct time is not displayed in these users on the forum. So if I understand it correctly will it be fixed in SMF 2.1.2?

https://github.com/SimpleMachines/SMF2.1/issues/7324

shawnb61

Yes. There may be a need to reset the user timezones manually. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

jsx

I downloaded the package from github and installed SMF 2.1.2 and I have the correct time zone set in the admin panel and in my account settings. SMF 2.1.2 automatically detects forum time zone?


Sesquipedalian

Quote from: jsx on April 21, 2022, 02:08:20 PMSMF 2.1.2 automatically detects forum time zone?

If no default time zone has been selected yet in SMF's own settings, it falls back to whatever PHP is using for its default time zone. PHP in turn might have a specific default time zone selected in its settings, or it might fall back to whatever time zone the server's operating system is using.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

jsx

@Sesquipedalian thank you for the clarification.

Quote from: shawnb61 on April 21, 2022, 09:27:51 AMThere may be a need to reset the user timezones manually.

If someone updated the forum from 2.0.x to 2.1.1 now someone have to manually reset the timezone for all users? How to do it?


@rjen

With an sql statement directly in the database ...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Sesquipedalian

FYI, this is incorrect:

Quote from: Pyrhel on February 12, 2022, 12:14:55 PMI saw in the admin page I can disable customizing timezone by the users

Setting the default time zone for the forum does not prevent individual members from choosing a different time zone.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

jsx

For the test I changed the time zone for a few users. And then in phpMyAdmin in the database in the SQL tab I entered this command:

UPDATE `smf_members` SET `timezone` = 'Europe/Warsaw'
The time zone has changed to the correct time zone for all users.

List of Supported Timezones

https://www.php.net/manual/en/timezones.php

Sesquipedalian

If you want to do this, I would recommend just this:

UPDATE `smf_members` SET `timezone` = ''
...and then setting the forum's default time zone to Europe/Warsaw.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

jsx


Advertisement: