Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Edit profile button - change text
Avatar
Sebastian Schimpf
Member
sp_UserOfflineSmall Offline
Sep 25, 2016 - 5:20 am

Here is my code for the timezone (that has issues being displayed with correct timezone:

sp_SectionStart('tagClass=spPlainSection timezoneinfo', 'adminstuff2');
 echo '
 <p><span class="interface-note">Please note that the forum timezone is:</span> <strong>' . 
 sp_ForumTimeZone('echo=0&get=1') . 
 '</strong><span class="interface-note"> ~ Your timezone is:</span> <strong>' . 
 sp_UserTimeZone('echo=0&get=1') . 
 '</strong></p>';
sp_SectionEnd('', 'adminstuff2');
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 25, 2016 - 5:48 am

Using UTC timezones is WordPress is a really bad idea. They really only support them for backwards compatibility to the days when php had pretty bad timezone support. I have argued that they should nopt even do this. It is not well supported.

Please see this FAQ for how this works and what you should be doing. Note we also have a plugin available that adds the timezone selection to the wp registration form so new users are encouraged to get it right.

http://simple-press.dev/docume.....conds-ago/

I can't say that I agree with you on the relevance of showing the users timezone only if different but that;'s your call. If you add the 'get' argument to your code then it should work.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626