Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Wichtlmex on October 19, 2019, 06:35:48 AM

Title: Calender Settings -> Time Zone
Post by: Wichtlmex on October 19, 2019, 06:35:48 AM
Hi,
I have to enter a lot of events and I am bored with setting the time zone every time.
Is there a possibility to preset any time zone (even I do not need the drop-down list, it is always CEST)

regards
Michael
Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 19, 2019, 06:57:54 AM
Are you entering events for a single or multiple timezones? (IOW, do you want to always pre-set the same TZ, or different ones depending on the event?)

The setting seems to default to the forum server TZ, set under Administration > Configuration > Features and Options > General > Server timezone.


Edit: I'd almost consider this a bug, the events TZ should probably default to server TZ + forum offset.
Title: Re: Calender Settings -> Time Zone
Post by: Wichtlmex on October 19, 2019, 07:23:27 AM
Hi m4z,
YES, all events to be posted will require CEST time setting.

Whatwever server time zone I select, whatever offset I adjust, when posting a new event, the default drop-down menu entry always shows UTC.
The only way would be to ignore the UTC entry and just press "save" (furtherhin ignoring summer/wintertime changes) and adjust a time delay of 2h.

But if I do that NOW, all already finished calender posts will change 2h and I would have to re-edit everything :-(

Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 19, 2019, 07:28:18 AM
Ah, my bad then, I didn't test enough (my server TZ is UTC).

If you have DB access, you could post your events with UTC and then adjust the TZ in the DB. (I'd have to check how exactly though, currently on mobile.)
Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 19, 2019, 04:14:50 PM
Reported on GH. (https://github.com/SimpleMachines/SMF2.1/issues/5833)
Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 21, 2019, 04:29:39 PM
Part of the problem seems to be user error (thanks, @shawnb61):

[1]: because otherwise it is added to both the forum TZ and the user TZ, which is a problem if they're different (like in my case)
[2]: I assume you (will) have CEST in both cases, then this might work for you; in my case with different forum and user TZ it's not quite right yet (https://github.com/SimpleMachines/SMF2.1/issues/5833#issuecomment-544688673).
Title: Re: Calender Settings -> Time Zone
Post by: Wichtlmex on October 28, 2019, 04:23:26 PM
Hi m4z:
I am  following your message:

Now the setting CEST disappeared from the dropdown,...... just because summer time is over? Strange thing!
Now every user who will register should guess, "Algiers, Tunis" time UTC+1/CET  is valid for him/her, living in France, Switzerland, Germany, Austria, Poland, Denmark.......?  No middle european city is listed there!

I guess I will get a lot of complaints of new members about the calender times are wrong  :-( because they will not find easily the right time zone.
At least MY time entries are fine now!

regards
michael
Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 28, 2019, 05:09:14 PM
Quote from: Wichtlmex on October 28, 2019, 04:23:26 PM
Now the setting CEST disappeared from the dropdown,...... just because summer time is over? Strange thing!

Yeah, apparently it now has changed name from "[UTC+02:00] - CEST - Central European Summer Time" to "[UTC+01:00] - CET - Central European Time". At least it automatically adjusts the time so you don't have to manually change for summer-/wintertime.


Quote from: Wichtlmex on October 28, 2019, 04:23:26 PM
Now every user who will register should guess, "Algiers, Tunis" time UTC+1/CET  is valid for him/her, living in France, Switzerland, Germany, Austria, Poland, Denmark.......?  No middle european city is listed there!

I sorted the "DE" timezone on top, via the admin options, and then wrote a short guide for my users to select the top option (which, admittedly, is named CEST/CET).


Quote from: Wichtlmex on October 28, 2019, 04:23:26 PM
I guess I will get a lot of complaints of new members about the calender times are wrong  :-( because they will not find easily the right time zone.
At least MY time entries are fine now!

I'm not saying I like the situation (I don't); I just wanted to summarize the current state.
Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on October 28, 2019, 09:05:02 PM
Quote from: Wichtlmex on October 28, 2019, 04:23:26 PM
Hi m4z:
I am  following your message:

Now the setting CEST disappeared from the dropdown,...... just because summer time is over? Strange thing!
Now every user who will register should guess, "Algiers, Tunis" time UTC+1/CET  is valid for him/her, living in France, Switzerland, Germany, Austria, Poland, Denmark.......?  No middle european city is listed there!

I guess I will get a lot of complaints of new members about the calender times are wrong  :-( because they will not find easily the right time zone.
At least MY time entries are fine now!

regards
michael

yes, this timezone  issue has been an annoyance for me too.

I got my own issue (as admin) fixed today, by setting the timezone to my Chicago based server's timezone.  And setting my admin account timezone to "Forum Default"

My forum is in central america, as are my users, and the time is the same as in Chicago.

All good for me now......New Events get posted on the right day finally.

But on testing my users, still had an issue (to post new events on the right day in calendar).  So to solve it - I had to go , as admin, and manually change every single user's timezone to "Forum Default".

Success!

I wish new forum registrants' didn't have the option to pick their timezone.  Any new registrant should have their timezone set by default to "Forum Default"   IMHO



Title: Re: Calender Settings -> Time Zone
Post by: Kindred on October 29, 2019, 12:09:43 AM
Why?

What if someone from the east coast of the us or from Europe logged in? They should be able to set their time zone correctly
Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on October 29, 2019, 01:01:07 AM
What bugs me about this is that there is no forum default timezone setting.  But...  It's the default selection upon registration...
Title: Re: Calender Settings -> Time Zone
Post by: Kindred on October 29, 2019, 10:55:23 AM
Forum default = setting of
Server timezone (which should be set in Admin AND on your server itself)
PLUS
Overall time offset

/index.php?action=admin;area=featuresettings;sa=basic

each user can then adjust the setting as needed.
However, if the original server timezone and/or offset was incorrectly set, users may have set their own offset... which will not be changed when the admin corrects the timezone/offset in admin.
Title: Re: Calender Settings -> Time Zone
Post by: m4z on October 29, 2019, 11:21:21 AM
What you say might be true for 2.0.x (where users can only configure their offset, AFAIK), but in 2.1, users don't have an own offset, and can only set their personal TZ. (And then, as discussed in the GH issue, the forum offset is, IMAO incorrectly, always added to the user TZ.)

So the basic message for 2.1 is: Don't use the offset at all.
Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on October 30, 2019, 12:18:02 AM
m4z is correct.  Any combination of a non-zero offset + a user selected (non-default) timezone breaks.  All times are displayed incorrectly.

I suspect the biggest part of the problem is understanding what the settings are supposed to mean.  What is the "server" timezone supposed to be?  The definition of "where your server is located" is strange; the location should be irrelevant.  No matter what this is set to, times are stored in the DB in UTC (for probably every server setup in the last 20 years...).   

What does work well is setting the "server" timezone to your desired default timezone, and a server offset of 0.  I.e., "server" timezone really = the default timezone used for display. 

OR, setting "server" to UTC and making sure all the users have a real TZ set.  The problem here is the default is now UTC...  So that takes work...

(I suspect the server offset should be used ONLY when the server is setup funky, i.e., truly non-UTC.  That's the only scenario where adding an offset 100% of the time makes sense.) 
Title: Re: Calender Settings -> Time Zone
Post by: Wichtlmex on November 04, 2019, 05:51:50 AM
Quote from: Kindred on October 29, 2019, 12:09:43 AM
Why?

What if someone from the east coast of the us or from Europe logged in? They should be able to set their time zone correctly

IMHO it should be possible to bypass any time change by SMF. If I publish an event in the calender, e.g. beginning at 20:15h, it should be always 20:15h, even if the visitor visits from the other side of the world!
Title: Re: Calender Settings -> Time Zone
Post by: Arantor on November 04, 2019, 06:21:34 AM
Yes but that visitor's 20:15 isn't necessarily your 20:15 which isn't necessarily the server's 20:15 either. This is why it needs to properly be able to cope with time zones which it currently isn't...?
Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on November 04, 2019, 09:58:04 AM
2.1 behaves pretty differently than 2.0, but all the labels & help text have the old behavior described.

Works fine per my note above.  I logged an issue on gh to align on & fix the text.
Title: Re: Calender Settings -> Time Zone
Post by: m4z on November 04, 2019, 11:10:15 AM
(This one: https://github.com/SimpleMachines/SMF2.1/issues/5850) ::)
Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on November 04, 2019, 10:45:06 PM
Quote from: Wichtlmex on November 04, 2019, 05:51:50 AM
Quote from: Kindred on October 29, 2019, 12:09:43 AM
Why?

What if someone from the east coast of the us or from Europe logged in? They should be able to set their time zone correctly

IMHO it should be possible to bypass any time change by SMF. If I publish an event in the calender, e.g. beginning at 20:15h, it should be always 20:15h, even if the visitor visits from the other side of the world!

EXACTLY

nail hit firmly on the head.
Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on November 04, 2019, 10:51:19 PM
Quote from: Arantor on November 04, 2019, 06:21:34 AM
Yes but that visitor's 20:15 isn't necessarily your 20:15 which isn't necessarily the server's 20:15 either. This is why it needs to properly be able to cope with time zones which it currently isn't...?

but an event will be happening at the specific time mentioned in the location it is specified to be occurring.

e.g. a Convention starting at 8pm on 12th October, Berlin.

It would be bizarre if a person in another time zone was figuring, okay what time will that Berlin event be starting in my timezone in say  Turkey, or California?  If you're going to the Berlin event, you will be going at 8pm Berlin time. 







Title: Re: Calender Settings -> Time Zone
Post by: m4z on November 05, 2019, 01:11:17 AM
What if it's a Livestream? I guess the time should be displayed in both the events TZ and the user TZ.
Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on November 05, 2019, 01:27:59 AM
It does show in both today, yours & event's in parens, like this: 
QuoteNov 05, 2019, 04:25 AM – 05:25 AM (06:25 AM – 07:25 AM CST)

I wouldn't overthink it, it works pretty good.  The language is confusing, we gotta fix that.
Title: Re: Calender Settings -> Time Zone
Post by: m4z on November 05, 2019, 01:36:01 AM
Yeah I know there were two, just didn't remember if it was user + forum or user + server, and didn't want to check on mobile. O:)
Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on November 05, 2019, 01:45:02 AM
The way it's working now, as noted above (and consistent with what Kindred noted above) is that the "server" = the "forum default". 

I've done a ton of experimentation, and it works just fine.  Leave the offset at 0 (unless you're not running UTC).  Set "server" to your desired forum default. 

There really should only be 2 TZs - forum & yours.  And that's the way it's working.
Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on November 07, 2019, 01:25:21 PM
Quote from: shawnb61 on November 05, 2019, 01:45:02 AM
The way it's working now, as noted above (and consistent with what Kindred noted above) is that the "server" = the "forum default". 

I've done a ton of experimentation, and it works just fine. 

my calendar is messed up AGAIN.  A member contacted me today to say that my calendar's event dates are a day off. 

Exact same issue I had when I installed the new RC2 script 10 days ago.  A day off for all entered events. 

I corrected the issue 10 days ago, by spending an hour tweaking all the dates .....and fixing the forum timezone to my host server, in Chicago. 

But stupidly a day ago, I reset the forum's timezone to that of my resident country (I am in central america).  My timezone is only one hour different from Chicago - so I thought an hour wouldn't be an issue.  I was mistaken, the calendar event dates are all messed up again.....they are again a day out.

Today, I reset the timezone again to Chicago  (where my server is)...presuming the calendar dates would correct themselves....frig, the event dates did not correct.

This is madness.  When so many folk are raising this issue, you can safely say there is an issue here.  Things aren't working fine.

I started today to look at calendar addons for wordpress, which the main part of my site is built on.  Great shame - because I like the look of SMF's events calendar.





Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on November 07, 2019, 09:18:52 PM
Are you using whole-day events?   

(100% of my testing is specific hours here & there - I'll start looking at whole day events.)



Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on November 07, 2019, 09:22:43 PM
yes, I am using whole day events, Shawn.   

Thanks for the reply (and all your work).

Title: Re: Calender Settings -> Time Zone
Post by: shawnb61 on November 07, 2019, 09:51:40 PM
Are you using RC2?  Or are you using the latest version of the code from GitHub?

I am pretty sure there were fixes to 'all day' events made since RC2.  This might explain why we're seeing different results.

These are the things that look like they're working to me:
- events, when viewed in forum tz or custom user tz
- all day events, when viewed in forum tz or custom user tz

HOWEVER...  Holidays may show a wrong date if viewed in a timezone other than the forum timezone. 

I just logged this, the screenshots tell the tale:
https://github.com/SimpleMachines/SMF2.1/issues/5863

These are the known, current calendar/timezone issues logged:
https://github.com/SimpleMachines/SMF2.1/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acalendar

(Note I just logged a very strange one with the date dropdowns, too...)
Title: Re: Calender Settings -> Time Zone
Post by: Northern Ireland on November 23, 2019, 01:00:35 PM
Quote from: shawnb61 on November 07, 2019, 09:51:40 PM
Are you using RC2?  Or are you using the latest version of the code from GitHub?

I am pretty sure there were fixes to 'all day' events made since RC2.  This might explain why we're seeing different results.

(Note I just logged a very strange one with the date dropdowns, too...)

Shawn, thanks for the reply.

I am using   SMF 2.1 RC2    I installed it about 5 weeks ago (download was from here at simplemachines site)

github site confuses me.   Where would I find the fixes there to download?