Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2009, 05:26 AM
stardotstar stardotstar is offline
 
Join Date: May 2008
Location: SYD, AU
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default What variable holds the current localtimezone for vB?

When displaying the post details what is the timezone set under?

date_default_timezone_get();

if this is right, does it incorporate the user's local zone as set in their UCP or is that another?

I have a plugin which is blowing a localtime back to UTC and yet the main board at the bottom of the page is undisturbed.

Appreciated
Wil
Reply With Quote
  #2  
Old 05-22-2009, 10:09 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All times in the database are stored in UTC and are only offset when displayed. The variable that holds the offset is:
PHP Code:
$vbulletin->userinfo['timezoneoffset'
Reply With Quote
  #3  
Old 05-22-2009, 10:16 AM
stardotstar stardotstar is offline
 
Join Date: May 2008
Location: SYD, AU
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for that - I will add it to my searching on this problem I have:

It seems for the purposes that I am troubleshooting I need to know how the timestamp for posts and pms and other items displayed are rendered back at UTC while the main board time is correctly displayed at the bottom of the board...

eg
All times are GMT +10. The time now is 21:11.

but at post at that time on the same page shows as
11:11 AM UTC

This is after a callout via a product to openx which has a bug that resets the php variable to UTC when called in a particular mode (local mode) but with javascript (soooo slooooow) works fine.

I am asking this question in various ways because I want to fix the phpadsnew integration (currently not being supported and at vb3.5) and all I need is the workaround to save the local timezone that is used to build the display date and then reset it after the call out but I am still learning (as fast as I can)

Thank you for the reply and to anyone else who can help me hack through to the next level of this project and my own skills as a php hack

Will
Reply With Quote
  #4  
Old 05-23-2009, 01:02 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm ... doing a OpenX call really should not affect the display of timestamps.
Are you 100% sure if is caused by that call?
Can you post some code?
Reply With Quote
  #5  
Old 05-25-2009, 05:38 AM
stardotstar stardotstar is offline
 
Join Date: May 2008
Location: SYD, AU
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As complete a description of my problem as I have been able to word it is here:
https://vborg.vbsupport.ru/showthread.php?t=214190

And I got further with the "bug" that supposedly causes it in openx:
https://vborg.vbsupport.ru/showthread.php?t=214252

In summary; if I have the code to call a localmode banner from openx all my times display in UTC (Except the one at the bottom of the pages which quotes the current time (it is both correct and showing the correct zone) The time is right - just shifted back to UTC (Board is set to +10 and most of my users are too.) Server time is ok as confirmed by many tests.

If I take the code out of the template system the system goes back to normal.

Have a look at my board comparing these two user selectable (guest) styles

http://www.archeli.com.au/forums
arcBLUE
arcLEAN

and you will see immediately what I mean. I added the tz syntax to the board time display to help give the users confidence that it is not a fault with the clock.

It seems that it is some kind of zone setting that openx causes whenever local mode is used - with javascript it is fine but soooo sloooooow...

Best regards and thanks in advance for any help

Will

[update]
Just turning on debug mode I see the following (shows the openx includes)
Code:
Included Files:

    * ./index.php
    * ./global.php
    * ./includes/init.php
    * ./includes/class_core.php
    * ./includes/config.php
    * ./includes/functions.php
    * ./includes/class_hook.php
    * .//var/www/sourcepoint/htdocs/openx/phpadsnew.inc.php
    * .//var/www/sourcepoint/htdocs/openx/init-delivery.php
    * .//var/www/sourcepoint/htdocs/openx/init-delivery-parse.php
    * .//var/www/sourcepoint/htdocs/openx/memory.php
    * .//var/www/sourcepoint/htdocs/openx/variables.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/common.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/cookie.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/remotehost.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/log.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Dal/Delivery.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/tracker.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/cache.php
    * .//var/www/sourcepoint/htdocs/openx/lib/OA.php
    * .//var/www/sourcepoint/htdocs/openx/lib/pear/Log.php
    * .//var/www/sourcepoint/htdocs/openx/lib/pear/PEAR.php
    * .//var/www/sourcepoint/htdocs/openx/var/plugins/cache/mergedDeliveryFunctions.php
    * .//var/www/sourcepoint/htdocs/openx/plugins/deliveryLimitations/Client/initClientData.delivery.php
    * .//var/www/sourcepoint/htdocs/openx/lib/OA/Dal/Delivery/mysql.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/adSelect.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/limitations.php
    * .//var/www/sourcepoint/htdocs/openx/lib/max/Delivery/adRender.php
    * .//var/www/sourcepoint/htdocs/openx/plugins/deliveryCacheStore/oxMemcached/oxMemcached.delivery.php
    * .//var/www/sourcepoint/htdocs/openx/plugins/deliveryDataPrepare/oxDeliveryDataPrepare/dataCommon.delivery.php
    * .//var/www/sourcepoint/htdocs/openx/plugins/deliveryLog/oxLogRequest/logRequest.delivery.php
    * .//var/www/sourcepoint/htdocs/openx/plugins/deliveryAdRender/oxMarketDelivery/oxMarketDelivery.delivery.php
    * ./chat/temp/config.srv.php
    * ./chat/inc/langs/en.php
    * ./includes/functions_bigthree.php
    * ./includes/functions_forumlist.php
    * ./includes/functions_calendar.php
    * ./photoplog/thumbnails.php
    * ./includes/photoplog_prefix.php
    * ./photoplog/permissions.php
    * ./includes/adminfunctions.php
    * ./photoplog/functions.php
    * ./includes/functions_newpost.php
    * ./includes/blog_functions_shared.php
Code:
Hooks Called:

    * init_startup
    * fetch_userinfo_query
    * fetch_musername
    * fetch_userinfo
    * cache_permissions
    * style_fetch
    * cache_templates
    * global_start
    * parse_templates
    * notifications_list
    * global_setup_complete
    * forumhome_start
    * forumhome_loggedinuser_query
    * forumhome_loggedinuser
    * cache_ordered_forums
    * forumbit_display
    * forumbit_subforumbit
    * forumbit_subforumbit2
    * forumhome_complete
    * photoplog_thumbnails_start
    * photoplog_thumbnails_sortsql_random
    * photoplog_functions_filelink
    * photoplog_thumbnails_minithumbpics
    * photoplog_thumbnails_minithumbnails
    * photoplog_thumbnails_sortsql_new
    * photoplog_thumbnails_thumbpics
    * photoplog_thumbnails_thumbnails
    * photoplog_thumbnails_complete
I have tried changing the execution order of the two plugins for phpadsnew integration; also the hook location but to no avail.

Any and all ideas or suggestions are most appreciated.
\\'
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04788 seconds
  • Memory Usage 2,207KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete