vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Which Time Function To Use? (https://vborg.vbsupport.ru/showthread.php?t=213489)

paul41598 05-12-2009 02:11 PM

Which Time Function To Use?
 
I'm creating something where I can choose expiration date on threads. Basically the entire thing is working good, but my time function is off, or I'm doing something wrong.
The below is in my newpostcomplete hook. It puts in 1242169200 which translates to 23:00:00 GMT, but 07:00:00pm my time (eastern). What I want it to do is insert basically like 11:59:00pm into every single thread where I choose an expiry date.

how do I tackle this? I'm horrible with time stuff! :eek:


Quote:

$thread_expiry = vbmktime(23, 0, 0, $vbulletin->GPC['thread_expiry']['month'], $vbulletin->GPC['thread_expiry']['day'], $vbulletin->GPC['thread_expiry']['year']);

Seven Skins 05-12-2009 09:22 PM

It is fetching the date and time from server. find out what time zone your server is and adjust the date accordingly.


All times are GMT. The time now is 03:57 PM.

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.01064 seconds
  • Memory Usage 1,709KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete