Author |
Message |
Frogger
Worker


Joined: Oct 06, 2003
Posts: 108
|
Posted:
Tue Oct 28, 2003 8:26 pm |
|
How many files are there that must be changed to reflect EST as my local GMT in 6.9?
Currently my host in in the UK and all times reflect a 5 hour difference even though I have my site and forum preferences set to -5 and en-US.
Each of my stories, new, etc.. are reflected as BST +5 hours.
Guess I should also go ahead and ask the next question.
How do I calculate the proper numeric value to make the change when I do find each entry to change?
Dummy here.  |
_________________ Only registered users can see links on this board! Get registered or login! |
|
 |
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Oct 28, 2003 9:10 pm |
|
I have this from my archives. Honestly, I need to know if this works or not. Edit mainfile.phpCode:function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime(($datetime[4]-15),$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}
| Note the -15. That is supposedly the offset in hours. If it doesn't work, then I will delete the post. |
|
|
|
 |
Frogger

|
Posted:
Tue Oct 28, 2003 10:18 pm |
|
Get this error after changing the code.
Code:Fatal error: Call to a member function on a non-object in /home/WWW/public_html/index.php on line 18
|
|
|
|
|
 |
Raven

|
Posted:
Tue Oct 28, 2003 10:22 pm |
|
Er, that's a replacement for the function already in mainfile.php. Did you replace the one already there or just add it? |
|
|
|
 |
Frogger

|
Posted:
Tue Oct 28, 2003 10:34 pm |
|
|
|
 |
Raven

|
Posted:
Wed Oct 29, 2003 8:14 am |
|
I tried the code and it works for me. Obviously, sir, you have done it wrong <MUHAHAHA>. Is it really not working? |
|
|
|
 |
Frogger

|
Posted:
Wed Oct 29, 2003 8:33 am |
|
I wepraced it, I did, I did, I did...
Will twy again. |
|
|
|
 |
Frogger

|
Posted:
Wed Oct 29, 2003 8:53 am |
|
Had an extra }
It works fine. |
|
|
|
 |
Raven

|
Posted:
Wed Oct 29, 2003 9:02 am |
|
I knew that  |
|
|
|
 |
|