vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - World Time Zones (https://vborg.vbsupport.ru/showthread.php?t=94505)

Dan 08-18-2005 06:46 PM

Nice job Bob :D I really like it

Boofo 08-18-2005 07:17 PM

Quote:

Originally Posted by Dan
Nice job Bob :D I really like it

Thank you, sir. ;)

Marco van Herwaarden 08-18-2005 08:05 PM

Bob i got another idea for you. Guess it should be fairly simple to make and i have been walking around with the idea a long time, but just never cam to making it. What about the posters local time in the postbit (the time he made the post, next to the time the post was made).

Boofo 08-18-2005 08:08 PM

Quote:

Originally Posted by MarcoH64
Bob i got another idea for you. Guess it should be fairly simple to make and i have been walking around with the idea a long time, but just never cam to making it. What about the posters local time in the postbit (the time he made the post, next to the time the post was made).

You lost me. The time he made the post would be the same as the time the post was made. Do you mean their local time where they are at? I did that for vb3. It showed their local time at the time the user was veiwing the post. Am I close here to what you are thinking? ;)

Marco van Herwaarden 08-18-2005 08:17 PM

Getting close yes :D

Maybe both the local time of the poster now, and when he made the post.

Boofo 08-18-2005 08:21 PM

Quote:

Originally Posted by MarcoH64
Getting close yes :D

Maybe both the local time of the poster now, and when he made the post.

Ok, I'll see what I can do. ;)

IceBurn3000 08-19-2005 02:50 AM

My forum is set for GMT+10 (Australian Eastern Standard Time). All is good, except for the fact that all times are 12 hours ahead of the current time.

Any suggestions on how to fix this?

EDIT: Also, I don't this plugin can tell whether Daylight Savings Time (DST) is active in a particular timezone or not. Currently, it is winter in Australia, and DST isnt 'active' in southern states, however, the times for Sydney, Melbourne & Canberra are all 1 hour ahead of Brisbane (AEST) time.

Thanks,

Boofo 08-19-2005 05:19 AM

Quote:

Originally Posted by IceBurn3000
My forum is set for GMT+10 (Australian Eastern Standard Time). All is good, except for the fact that all times are 12 hours ahead of the current time.

Any suggestions on how to fix this?

EDIT: Also, I don't this plugin can tell whether Daylight Savings Time (DST) is active in a particular timezone or not. Currently, it is winter in Australia, and DST isnt 'active' in southern states, however, the times for Sydney, Melbourne & Canberra are all 1 hour ahead of Brisbane (AEST) time.

Thanks,

Do you have a test account set up where I can look at the World Times?

IceBurn3000 08-19-2005 09:16 AM

Quote:

Originally Posted by Boofo
Do you have a test account set up where I can look at the World Times?

I will PM you details.

EDIT:
Quote:

Originally Posted by Boofo in PM
Ok, I see the problem. Your server is not set on GMT time, right? The line in the worldtimes.php is for servers set on GMT time. We need to adjust that line according to what time your server is actually on.

This line:

$servertime = ($timeoffset - ($timediff+2)); //Server is on GMT time

is GMT time. We need to change the 2 to match whatever your server time is set to, not the vb setting, but the actual server time. Does that make any sense? ;)

Try -10 instead of +2 and let me know what you get.

Work like a charm! Thanks for your help Bob!

merk 08-21-2005 06:13 AM

Just a few suggestions:

Your timezone arrangements for 10 and 11 are wrong. Sydney, Melbourne and Canberra are +10, not +11. They go to +11 for DST, but that should not affect their normal +10 offset.

I believe that they should always remain in the +10, but also highlight them to indicate they are in DST.

--

There should be a PHP method to determin if a certain timezone is in DST. I would use that instead of using a user's DST determination.

--

There is a better (less templates) way to show the local users timezone.

PHP Code:

if ($timediff == $vbulletin->userinfo['timezoneoffset'])
{
//blah
}
else
{
//blah


Can Become:

PHP Code:

 
$show
['localtimezone'] = false;
if (
$timediff == $vbulletin->userinfo['timezoneoffset'])
{
$show['localtimezone'] = true;


And using conditionals in the single template instead.

--

There are also functions available in the vbulletin options array for server time.

PHP Code:

$vbulletin->options['timeoffset'is server offset 

--

Finally, you should use UTC, not GMT, because GMT changes forward 1 hour for dst. UTC doesnt :)


All times are GMT. The time now is 09:16 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.01578 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete