[OzzModz] Members' Local Time

[OzzModz] Members' Local Time 2.0.0 Patch Level 3

No permission to download
Got some errors in the logs.

Code:
TypeError: Macro public:thmemberslocaltime_message_macros :: user_info() error: Argument 1 passed to XF\Language::formatDateTime() must be an instance of DateTime, bool given, called in /var/www/html/pattayaforum.net/www/forums/src/XF/Language.php on line 615
              
src/XF/Language.php:458

          
Generated by: Unknown account
              
6 Nov 2021 at 16:58

       
Stack trace
      
           #0 src/XF/Language.php(615): XF\Language->formatDateTime(false, 'H:i')
#1 src/XF/Template/Templater.php(4131): XF\Language->time('', NULL)
#2 [internal function]: XF\Template\Templater->fnTime(Object(SV\StandardLib\XF\Template\Templater), true, '')
#3 src/XF/Template/Templater.php(1103): call_user_func_array(Array, Array)
#4 internal_data/code_cache/templates/l2/s44/public/thmemberslocaltime_message_macros.php(14): XF\Template\Templater->func('time', Array, true)
#5 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l2/s44/public/message_macros.php(144): XF\Template\Templater->callMacro('thmemberslocalt...', 'user_info', Array, Array)
#7 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#8 internal_data/code_cache/templates/l2/s44/public/post_macros.php(26): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#9 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#11 internal_data/code_cache/templates/l2/s44/public/post_macros.php(158): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l2/s44/public/post_macros.php(211): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#15 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#16 internal_data/code_cache/templates/l2/s44/public/thread_view.php(952): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#17 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#18 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#19 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#20 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#21 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#23 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#24 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#25 src/XF.php(488): XF\App->run()
#26 index.php(20): XF::runApp('XF\\Pub\\App')
#27 {main}
      
      
Request state
           array(4) {
  ["url"] => string(76) "/forums/threads/als-alleinreisender-nur-einfache-hotels-moeglich.7814/page-2"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
If it helps there is another message related to this.

Code:
    ErrorException: Template error: [E_USER_WARNING] Cannot call method getLocalTime on a non-object (NULL) src/XF/Template/Templater.php:1151

    Generated by: Unknown account 6 Nov 2021 at 16:58

Stack trace

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/html/p...', 1151, Array)
#1 src/XF/Template/Templater.php(1151): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l2/s44/public/thmemberslocaltime_message_macros.php(14): XF\Template\Templater->method(NULL, 'getLocalTime', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l2/s44/public/message_macros.php(144): XF\Template\Templater->callMacro('thmemberslocalt...', 'user_info', Array, Array)
#5 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l2/s44/public/post_macros.php(26): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l2/s44/public/post_macros.php(158): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l2/s44/public/post_macros.php(211): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l2/s44/public/thread_view.php(952): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#15 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#17 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#18 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#19 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#22 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#23 src/XF.php(488): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}

Request state

array(4) {
  ["url"] => string(76) "/forums/threads/als-alleinreisender-nur-einfache-hotels-moeglich.7814/page-2"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
I'm getting the following error with PHP8.1

Code:
ErrorException: Template error: [E_DEPRECATED] DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated src\addons\ThemeHouse\MembersLocalTime\XF\Entity\User.php:37

Code:
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(8192, '[E_DEPRECATED] ...', 'C:\\root\\Forums\\...', 37)
#1 src\addons\ThemeHouse\MembersLocalTime\XF\Entity\User.php(37): DateTime->__construct(NULL, Object(DateTimeZone))
#2 src\XF\Template\Templater.php(1191): ThemeHouse\MembersLocalTime\XF\Entity\User->getLocalTime()
#3 internal_data\code_cache\templates\l2\s3\public\thmemberslocaltime_message_macros.php(14): XF\Template\Templater->method(Object(SV\SignupAbuseBlocking\XF\Entity\User), 'getLocalTime', Array)
#4 src\XF\Template\Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#5 internal_data\code_cache\templates\l2\s3\public\message_macros.php(71): XF\Template\Templater->callMacro('thmemberslocalt...', 'user_info', Array, Array)
#6 src\XF\Template\Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#7 internal_data\code_cache\templates\l2\s3\public\post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#8 src\XF\Template\Templater.php(987): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#9 src\XF\Template\Templater.php(923): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#10 internal_data\code_cache\templates\l2\s3\public\post_macros.php(239): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#11 src\XF\Template\Templater.php(987): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 src\XF\Template\Templater.php(923): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#13 internal_data\code_cache\templates\l2\s3\public\post_macros.php(280): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#14 src\XF\Template\Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#15 internal_data\code_cache\templates\l2\s3\public\thread_view.php(865): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#16 src\XF\Template\Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#17 src\XF\Template\Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#18 src\XF\Mvc\Renderer\Html.php(50): XF\Template\Template->render()
#19 src\XF\Mvc\Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#20 src\XF\Mvc\Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src\XF\Mvc\Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src\XF\Mvc\Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#23 src\XF\App.php(2351): XF\Mvc\Dispatcher->run()
#24 src\XF.php(517): XF\App->run()
#25 index.php(20): XF::runApp('XF\\Pub\\App')
#26 {main}
 
Hello @Ozzy47

My members are always complaining about the time and because I am on cloud I cannot do much other than to tell them where to set it in the control panel.

I installed this addon so each user can see their local time but what would make this extension great is if the time was linked to the setting in the control panel. So if a user did not like their time they could change it with a click.

The only obvious issue is that the link should only be clickable when a member is viewing their own user time.
 
Back
Top Bottom