Time zone error

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
NoOneImportant
Newbie
Newbie
Posts: 1
Joined: Tue Aug 21, 2018 9:44 pm

Time zone error

Post by NoOneImportant »

Hello, right now I'm trying to play a game called Graveyard Keeper. It launches fine, but on loading screen game gives me a "unable to initialize time zone, check your OS settings [..]' error. Is there a a way around it?
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Time zone error

Post by DarkShadow44 »

Did you already try a fresh WINEPREFIX with latest Wine (3.14) or wine-staging?

If so, please provide a log (remember to use the code tags - or a pastebin like site if the log is too big). Also a screenshot of the error message would be good.

Also, is there a reason you don't use the native Linux version of the game?
ouixifha
Newbie
Newbie
Posts: 2
Joined: Tue Sep 11, 2018 4:47 pm

Re: Time zone error

Post by ouixifha »

You need to define your timezone in the registry as explained here: https://azyobuzin.hatenablog.com/entry/ ... /17/002707

So, a generic UTC solution could be to bootstrap with:

Code: Select all

#!/bin/sh
WINEPREFIX="$HOME/.wine_graveyard_keeper" WINEARCH=win32 wine wineboot
WINEPREFIX="$HOME/.wine_graveyard_keeper" WINEARCH=win32 wine reg add 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation' /v TimeZoneKeyName /t REG_SZ /d 'Coordinated Universal Time' /f
WINEPREFIX="$HOME/.wine_graveyard_keeper" WINEARCH=win32 wine ./setup_graveyard_keeper_1.031_(23600).exe
And execute with:

Code: Select all

#!/bin/sh
cd "$HOME/.wine_graveyard_keeper/drive_c/GOG Games/Graveyard Keeper"
TZ=UTC WINEPREFIX="$HOME/.wine_graveyard_keeper" WINEARCH=win32 wine "./Graveyard Keeper.exe"
By the looks of it you can match your system timezone to the one specified in the registry by looking under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones" for valid dlt entries like how the original post used "Tokyo Standard Time".
ouixifha
Newbie
Newbie
Posts: 2
Joined: Tue Sep 11, 2018 4:47 pm

Re: Time zone error

Post by ouixifha »

TL;DR:

Code: Select all

wine reg add 'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation' /v TimeZoneKeyName /t REG_SZ /d 'Coordinated Universal Time' /f
Fixed upstream: https://bugs.winehq.org/show_bug.cgi?id=37760
Locked