Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Sunday, May 19 2013 @ 07:40 PM EDT


 Forum Index > Extensions > Cool Hacks New Topic Post Reply
 Timezone Hack
First | Previous | 1 2 3 4 5 | Next | Last
   
Dirk
 10/22/07 03:22AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
This hack has been rolled into the Geeklog core code for a while now. You only need to set $_CONF['timezone‘] in your config.php

bye, Dirk

 
Profile Email Website
 Quote
Anonymous: HELP ME....
 10/22/07 03:25PM  



Well thanks for your prompt reply. If this is the case, then I wish someone would keep the code comment up-to-date, because just above the timezone code there is the following text:

// "Timezone Hack"
// If your webserver is located in a different timezone than yourself but you
// prefer Geeklog to post stories in your local time, then set your local
// timezone here.
//
// Please note that this does not work when safe_mode is on!
//
// For more information, see this discussion on geeklog.net:
// http://www.geeklog.net/forum/viewtopic.php?showtopic=21232


Which obviously directs me to this thread.

Anyway, i've tried changing the timezone to GMT, but without any luck. Do you mind telling me how to change it to UK time?

Any help appreciated.. Thankyou.

 
 Quote
Anonymous: HELP ME....
 10/22/07 03:26PM  

angelic


ok, I see where i've been going wrong.. I needed to uncomment the line! Sorry, done and now working. Cheers.

 
 Quote
scarecrow
 10/24/07 01:25AM  
++---
Junior
confused

Status: offline


Registered: 10/24/07
Posts: 33
Quote by: Dirk

This hack has been rolled into the Geeklog core code for a while now. You only need to set $_CONF['timezone‘] in your config.php



I've come across another anomaly that I'm pretty sure is more of a server problem than a GL issue. The remote server is in EST/EDT, and I'm in CST/CDT. While the setting the 'timezone' variable does work to correct the zone, the time is always displayed without AM or PM. That is, if a message is posted at 15:30 in the afternoon, it displays '03:30 CDT'. This is true whether I set 'timezone' or let it ride as Eastern time, thus my suspicion that it's something with the server. I'd love to have all times displayed as 'military' (24 hour clock) Central time, but even knowing whether it was AM or PM would probably suffice. Any thoughts on how I might achieve either of the above? Thanks in advance!

 
Profile Email Website
 Quote
1000ideen
 10/24/07 05:37AM  
+++++
Full Member

Status: offline


Registered: 08/04/03
Posts: 1273
There is a forum search button... Confused
http://www.geeklog.net/forum/viewtopic.php?showtopic=78581

As far as I can see these php timezones work. :kickcan:

 
Profile Email Website
 Quote
scarecrow
 10/25/07 10:02PM  
++---
Junior

Status: offline


Registered: 10/24/07
Posts: 33
the time is always displayed without AM or PM. That is, if a message is posted at 15:30 in the afternoon, it displays '03:30 CDT'...

displayed as 'military' (24 hour clock) Central time


Well, as I suspected, things were a bit odd at the server. After a fairly long phone conversation with the hosting company, the tech found where there had been several time and time zone issues on a RedHat server on which the site in question lived. A sister server running Debian didn't have these issues. It required 90 minutes of downtime, but they transfered the entire account to the Debian box, and BINGO! Not only does AM/PM now show up, the 12/24 config setting works to show 'military' time if set to '24' and actually shows the correct hours between 13 and 23. Praise the Lord and pass the Zantac!

'crow

 
Profile Email Website
 Quote
rdunne
 11/23/07 01:04PM  
++---
Junior

Status: offline


Registered: 07/02/07
Posts: 27
worked for me in ireland using etc/gmt.
thanks
rich

 
Profile Email
 Quote
Anonymous: bk
 11/12/08 09:39AM  



Most of these hacks work, but the simple one is in the config.php file.
The problem for me (for days) :banghead: :banghead: was safe mode.

Before you go any further call your provider and ask to have safemode shut off.

Then all is well with the simple fix. Big Grin

 
 Quote
Anonymous: Brian
 03/10/09 09:22AM  



I have read the timezone hack post, but think this deserves it's own topic so it can be found specifically for the change to daylight savings time. I have two sites working great. Then Daylight savings time comes and my dates are showing Tuesday, "March 10 2009 @ 01:016 PM UTC" at 8:16 AM. Below is my timezone hack in config php. I tried adjusting it a number of ways and no luck. I get KRAT and several other unexpected time zones. I am in the US CST now Daylight saving time I think CDT is the abbreviation. I am sure this is a problem for others.

$_CONF['timezone'] = 'CST/GMT-6';

 
 Quote
gtgillis
 09/13/10 09:21AM  
++++-
Regular Poster

Status: offline


Registered: 11/05/03
Posts: 89
I tried the GL config timezone setting but it would not work. I then tried the SetEnv TZ America/Chicago in my .htaccess file but that did not work either.

Running Geeklog 1.7.0 on PHP 5.2.13 I just added the following to my lib-custom.php file.

PHP Formatted Code

date_default_timezone_set('America/Chicago');
 

 
Profile Email Website
 Quote
Dirk
 09/13/10 09:27AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by: gtgillis

I tried the GL config timezone setting but it would not work.


Please note that there are two timezone settings now (since 1.6.1): A global one in the Configuration and a per-user setting under My Account.

For details, see http://wiki.geeklog.net/index.php/Timezone_Support

bye, Dirk

 
Profile Email Website
 Quote
First | Previous | 1 2 3 4 5 | Next | Last
Content generated in: 1.35 seconds
New Topic Post Reply

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