summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-07 08:22:57 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-08-07 08:22:57 +0000
commitb8a2e8112e707f39c40a82055cf496958d7cd094 (patch)
treee44f251f0d2b1bf5fc305855f2b14f6630345b8e
parente53e9797c7d6b2c1631f40c4606011b1beba9c0d (diff)
downloadcrawl-ref-b8a2e8112e707f39c40a82055cf496958d7cd094.tar.gz
crawl-ref-b8a2e8112e707f39c40a82055cf496958d7cd094.zip
Fixed bug where start time of games would go backward or forward in time on dgl builds (oops).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6788 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/libunix.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 0859bc18f6..cd84a7a282 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -66,6 +66,8 @@ static struct termios game_term;
#include <signal.h>
#endif
+#include <time.h>
+
// Its best if curses comes at the end (name conflicts with Solaris). -- bwr
#ifndef CURSES_INCLUDE_FILE
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -422,6 +424,12 @@ void unixcurses_startup( void )
{
termio_init();
+#ifdef DGAMELAUNCH
+ // Force timezone to UTC.
+ setenv("TZ", "", 1);
+ tzset();
+#endif
+
#ifdef USE_UNIX_SIGNALS
#ifdef SIGQUIT
signal(SIGQUIT, SIG_IGN);