Warning: preg_replace_callback(): Requires argument 2, '$func['entity_fix']('\2')', to be a valid callback in /nfs/c01/h06/mnt/10927/domains/dragonprime.net/html/Sources/Load.php(225) : runtime-created function on line 3
How to change time on my server?
DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 21, 2019, 10:35:53 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: How to change time on my server?  (Read 4097 times)
0 Members and 1 Guest are viewing this topic.
squint
Member

Offline Offline

Posts: 2


View Profile
« on: November 10, 2010, 07:59:23 PM »

So, when it was 9:49pm where I live, it was 2010-11-11 03:49:55 am in LotGD.

And even though I set the Real time to offset new day to +06:00, which made it so a new game day technically does start at midnight my time, when I logged in several hours before midnight, the news was already showing the next day (and of course said "Nothing of note has happened" etc.

I'm assuming I need to change the time on my server?

I've tried creating an .htaccess file and adding "SetEnv TZ US/Central" to it and such.

Not sure what else to try. Any ideas? Thanks in advance for the help.  I am using NearlyFreeSpeech.net if that makes any difference.

Here's a screenshot that kinda explains my concern:

http://dl.dropbox.com/u/1697331/lotgd.png

As you can see, the game time is about 10:00pm on Nov 10, 2010, but the server time is Nov 11. And when a player signs in, the news for Nov 11 shows up, even though the game time isn't Nov 11 yet. Is that a bug? Or expected? How can I make the two 'aligned'?
« Last Edit: November 10, 2010, 08:05:38 PM by squint » Logged
Boris735
Mod God
*****
Offline Offline

Posts: 570


View Profile
« Reply #1 on: November 10, 2010, 11:22:16 PM »

Sounds like you should have used -18 hours instead of +6.
Logged
squint
Member

Offline Offline

Posts: 2


View Profile
« Reply #2 on: November 11, 2010, 04:34:33 AM »

That made it 6:34pm when it was 6:34am Smiley

What I need to do is change my server's time somehow. I contacted NearlyFreeSpeech.net's support about it. Hopefully they can help.
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #3 on: October 03, 2012, 05:37:26 PM »

I know this is an old thread, but in case anyone has the same problem here's a possible solution.

In the .htaccess file put:
Code:
<IfModule php5_module>
php_value date.timezone "America/New_York"
</IfModule>


Or try this in the file root/lib/local_config.php
Code:
ini_set("date.timezone","Europe/London");

You can't just put in any location, check out this list of supported timezones.

Smiley

Edit:
Changed the htaccess code.
« Last Edit: October 04, 2012, 05:47:18 AM by Afkamm » Logged

Check My Modules for the latest versions.
Aeolus
Mod God
*****
Offline Offline

Posts: 1934


You're welcome.


View Profile WWW
« Reply #4 on: October 04, 2012, 03:42:06 AM »

I know this is an old thread, but in case anyone has the same problem here's a possible solution.

In the .htaccess file put:
Code:
php_value date.timezone "Europe/London"


Or try this in the file root/lib/local_config.php
Code:
ini_set("date.timezone","Europe/London");

You can't just put in any location, check out this list of supported timezones.

Smiley

The first one seems to give an Internal Server Error. o.o Second one works! It just updates all of my modules. o.o
Logged

MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1752


View Profile
« Reply #5 on: October 04, 2012, 05:51:38 AM »

I've changed the code for the htaccess in my previous post, people say it works, others say they get a 500 error. PHP needs to be running as a module and not as CGI.

Just all depends on how the server is configured.

This might also work when placed inside a php file:
Code:
date_default_timezone_set("America/Chicago");
Logged

Check My Modules for the latest versions.
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
71 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search