Welcome to Geeklog, Anonymous Wednesday, December 04 2024 @ 01:35 pm EST

Geeklog Forums

Timezone struggle...


Status: offline

cthesoup

Forum User
Junior
Registered: 11/07/03
Posts: 16
My server lives in CST. I do not control the server (it's on a web hosting company). My organization lives in EST. The time on my webpage is using the server's CST time which is an hour behind, and it also says CST. I'd like the time to be correct (1 hour ahead), and read EST. How can I change this?

Thanks gurus,

Christian
 Quote

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
You may want to do a search on this page for "timezone" ... try here: Timezone FAQ

what i did, around line 174 of the config.php i added this:
Text Formatted Code

$_CONF['timezone'] = 'Canada/Pacific'; // time-zone hack

 

in my /path/to/geeklog/public_html/lib-common.php, directly below require_once add( '/path/to/geeklog/config.php' ); add the following:
Text Formatted Code

if ( !empty($_CONF['timezone'])
&& !ini_get("safe_mode"))
{ putenv("TZ=".$_CONF['timezone']); }

 

-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
 Quote

Status: offline

cthesoup

Forum User
Junior
Registered: 11/07/03
Posts: 16
Thanks for the help. All is fixed. Between your code, and the fix in the Timezone FAQ in story.php, all is working well.

Christian
 Quote

All times are EST. The time is now 01:35 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content