Welcome to Geeklog Tuesday, June 02 2020 @ 01:47 pm EDT

Geeklog Forums

Time Offset from the server time


Anonymous

Anonymous
Hi there, I tried to find a Time Offset variable eaither in language file or config so my site can show my local time to the visitors insted of the server time which is (-7) from my place. I hope somebody can tell me how to do it.. Regards, Ageel
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany

Yes, this is a known shortcoming - Geeklog will always use the time zone of the server it's running on.

Maybe this Timezone hack works for you.

bye, Dirk

 Quote

Status: offline

isol8

Forum User
Regular Poster
Registered: 14/05/02
Posts: 73
Geeklog's Greatest Hits Vol.1 Order your copy today...featuring crowd favorites like: 1. "I Fought PHP, and PHP won." 2. "This path is your path, This path is my path" 3. "8675309: You have an error in your SQL syntax" 4. "Template Error: Halt in the Name of Love"
 Quote

Anonymous

Anonymous
hi, thanx, it solved the display part, but, the server still retrieve the recored of the database according to it's local time while the article I made are stored using my local time Frown I think there must be something to add the time offset to SQL queries also. any idea? Ageel
 Quote

Status: offline

xbrief

Forum User
Junior
Registered: 21/12/02
Posts: 18
Quote by Dirk:

Yes, this is a known shortcoming - Geeklog will always use the time zone of the server it's running on.

Maybe this Timezone hack works for you.

bye, Dirk


Clicking on the link brings me back to the Index page. I am interested in the Server Time Offset problem too.
Don't curse the darkness, light a fire. Don't wait for the sunrise. Walk towards the dawn.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by xbrief: Clicking on the link brings me back to the Index page.


Looks like that link wasn't converted when we moved stories to the forums. A simple search for "timezone hack" brings up this thread (with horrible formatting), and a lot more ...

bye, Dirk
 Quote

Status: offline

xbrief

Forum User
Junior
Registered: 21/12/02
Posts: 18
Quote by Dirk:
Quote by xbrief: Clicking on the link brings me back to the Index page.


Looks like that link wasn't converted when we moved stories to the forums. A simple search for "timezone hack" brings up this thread (with horrible formatting), and a lot more ...

bye, Dirk

The hack is good for time zones. But when I post an article, the time of posting that is given is the time zone of the server AS determined from my Time zone (Asia/Manila). I'd like to see a hack that would cure this.
Thanks.
Don't curse the darkness, light a fire. Don't wait for the sunrise. Walk towards the dawn.
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 12/01/03
Posts: 445
I followed that thread and now all times in my geeklog are CET while the server is under EST Big Grin
 Quote

Status: offline

xbrief

Forum User
Junior
Registered: 21/12/02
Posts: 18
Quote by xbrief:
Quote by Dirk:
Quote by xbrief: Clicking on the link brings me back to the Index page.


Looks like that link wasn't converted when we moved stories to the forums. A simple search for "timezone hack" brings up this thread (with horrible formatting), and a lot more ...

bye, Dirk

The hack is good for time zones. But when I post an article, the time of posting that is given is the time zone of the server AS determined from my Time zone (Asia/Manila). I'd like to see a hack that would cure this.
Thanks.

All? Does that mean even your posted articles?
Don't curse the darkness, light a fire. Don't wait for the sunrise. Walk towards the dawn.
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 12/01/03
Posts: 445
Quote by xbrief:
All? Does that mean even your posted articles?

Yes, postings, forum, downloads (filemgmt)
For some reasons I disabled the posting time, but I can check it in the postings list and yes, it's correct.

The imortant part for the postings was
Quote by Anonymous: Joe:
On line 910, I changed the DB_save call a little. Instead of storing $date, I changed it to FROM_UNIXTIME($unixdate)

(admin/story.php that is)

geKow
 Quote

Status: offline

xbrief

Forum User
Junior
Registered: 21/12/02
Posts: 18
Quote by geKow:
Quote by xbrief:
All? Does that mean even your posted articles?

Yes, postings, forum, downloads (filemgmt)
For some reasons I disabled the posting time, but I can check it in the postings list and yes, it's correct.

The imortant part for the postings was
Quote by Anonymous: Joe:
On line 910, I changed the DB_save call a little. Instead of storing $date, I changed it to FROM_UNIXTIME($unixdate)

(admin/story.php that is)

geKow

But that would be if your server is Unix right?

Don't curse the darkness, light a fire. Don't wait for the sunrise. Walk towards the dawn.
 Quote

Status: offline

xbrief

Forum User
Junior
Registered: 21/12/02
Posts: 18
Quote by xbrief:
Quote by geKow:
Quote by xbrief:
All? Does that mean even your posted articles?

Yes, postings, forum, downloads (filemgmt)
For some reasons I disabled the posting time, but I can check it in the postings list and yes, it's correct.

The imortant part for the postings was
Quote by Anonymous: Joe:
On line 910, I changed the DB_save call a little. Instead of storing $date, I changed it to FROM_UNIXTIME($unixdate)

(admin/story.php that is)

geKow

But that would be if your server is Unix right?

Ummm I tried it. It looks good. Thanks. Big Grin
Don't curse the darkness, light a fire. Don't wait for the sunrise. Walk towards the dawn.
 Quote

Status: offline

geKow

Forum User
Full Member
Registered: 12/01/03
Posts: 445
outch...
what have you done? maybe you should stop quoting for this thread Wink

geKow
 Quote

All times are EDT. The time is now 01:47 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