[Pushed] Wrong time in quote subscribedmember email notification
#1
Hi guys,

I am getting wrong time in subscribedmember email notification.

MyBB Version 1.8.21 
PHP Version 5.6.40-1~dotdeb+7.1
SQL Engine MySQLi 5.5.60

Server:
/etc/timezone > Europe/Bratislava
$date: Wed May 13 11:40:01 CEST 2020


ACP > Default Timezone Offset > GMT +1
ACP > Day Light Savings Time > Yes


User1
Username: apache-user
CP > TimeZone > GMT -1
CP > Daylight Saving Time correction > Always
Local time: 09:40:01

User2
Username: gasper
CP > TimeZone > GMT +1
CP > Daylight Saving Time correction > Always
Local time: 11:40:01

Post view as apache-user:
[Image: wJAxCbp.png]

Email received by user gasper:
[Image: DHpepgK.png]
Red labelled time should be "(Today, 11:42)". Because then user gasper wrote the post in his local time. This time (09:42) is in apache-user's timezone, which is wrong, because recipient is gasper.

Do you know what's wrong?
Reply
#2
OK, seems a valid bug/enhancement report.
Could be wrong but worth a try.
Reply
#3
Looked at the parser in function mycode_parse_post_quotes():

https://github.com/mybb/mybb/blob/featur...r.php#L891
https://github.com/mybb/mybb/blob/featur...r.php#L895

The time of dateline in the quote block in the post will be parsed in the timezone of current viewer's, and in OP's situation the timezone of the user who replied the post and then triggered the PM/Email notifications.

I think the function can have an extra parameter timezone for parsing dateline. But looks not feasible, since the function is used in callbacks where timezone info can't get passed in.

However, I do have a way to implement this by adding a member variable $secondary_timezone in the parser class and use it when necessary. But that's too dirty a work...
Could be wrong but worth a try.
Reply
#4
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/4086

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)