diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-07 08:29:53 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-08-07 08:29:53 +0000 |
commit | 4abb413f41391fc7ac867a4fe4032e33103ba27e (patch) | |
tree | 28c0e2562d1aec86bd0ad16c04e5f049b1adf19d /crawl-ref/source/libunix.cc | |
parent | 52fa41b7a9881c60f8d0c27b206b17da299d2b52 (diff) | |
download | crawl-ref-4abb413f41391fc7ac867a4fe4032e33103ba27e.tar.gz crawl-ref-4abb413f41391fc7ac867a4fe4032e33103ba27e.zip |
0.4->trunk r6788: 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/trunk@6789 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 8 |
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); |