What's up with the timezone?

Questions about Wine on Linux
Locked
gl|LoliconGuy
Newbie
Newbie
Posts: 1
Joined: Tue Jun 23, 2015 3:54 pm

What's up with the timezone?

Post by gl|LoliconGuy »

No, I'm not coming asking to fix the typical ntdll error. After lot of trial and error, I found a "matching" timezone, which is -2 hours than the time on mine country (in Ubuntu settings it appear as "Santiago" although this setting is still wrong, because this year we'll keep in "summer" time). If I'm correct, the timezone has to be registered somewhere or something like that, but I'm not going to ask how to do that either.

See, in fact, most of time isn't such a big problem, overall most programs seem to work just fine, all but the .NET programs, which can't work if a "wrong" timezone is given.

My question is: Is this mess about the timezone even necessary? I mean, what's the technical reason behing all this? Is it fault of some programs whose creators decided they had to do certain functions given certain time? and why can't Wine just take its required data from the OS and maybe convert/fake to the input data those programs require to work?
What's the point of all this? If there's a good reason behind, I want to understand :S
oiaohm
Level 8
Level 8
Posts: 1020
Joined: Fri Feb 29, 2008 2:54 am

Re: What's up with the timezone?

Post by oiaohm »

My question is: Is this mess about the timezone even necessary? I mean, what's the technical reason behing all this?
Answer is annoying yes. Most users what Local time where they are displayed and most network traffic(like dhcp leases) requires UTC time. And to get between those two values is timezone data.
Is it fault of some programs whose creators decided they had to do certain functions given certain time?
Some cases it can be the program fault.
http://stackoverflow.com/questions/2969 ... is-changed
Yes .net caches what timezone it was using. So hello trouble. Some things on Windows like Java ship with there own independent to system data timezones but under Linux and OS X uses system wide. So timezone program with windows application might be the application itself. There is a universal hack in this case give up having localtime some applications that are problemmatic. TZ=UTC wine in other words completely loss the idea of localtime.
why can't Wine just take its required data from the OS and maybe convert/fake to the input data those programs require to work?
Not good idea. Remember UTC has to as per GMT or your network traffic is screwed and you want localtime correct. So correct the timezone file.
If I'm correct, the timezone has to be registered somewhere or something like that, but I'm not going to ask how to do that either.
This is what you really do need the answer to.

https://joeyh.name/blog/entry/howto_cre ... time_zone/
Making your own private timezone file is not hard. Even using your own private timezone file is not hard. So there is absolutely no reason for wine to fake this up. Linux and OS X supports independent timezone per application. Its just setting TZ var to tell what timezone the application should be using. TZDIR to tell it to look in a non standard location if you need to. You find the zic timezone complier and zdump timezone decomplier is already installed on your system.

So fairly much everything you need to deal with a timezone issue is Linux/OS X native. localtime default value is set insanely simply. Copy of timezone file that happens to be at /etc/localtime I would personally check that it has been updated for correct file and that is in fact the correct file.

1 /usr/share/zoneinfo/posix/America/Santiago
2 /usr/share/zoneinfo/America/Santiago
3 /usr/share/zoneinfo/right/America/Santiago

How did I find these. find /usr/share/zoneinfo -iname "Santiago" Of course change for what ever region you are attempting to find timezone file on. right does appear as a option when selecting timezone by the select timezone tools.(Yes right is sometimes very critical)

Just to be fun on my system file 1 and 2 are identical to each other. File 3 is in fact different. zdump -v those files shows you want is hiding in them.

Why would a system have incorrect timezone files. You have to work with systems with incorrect timezone files that is why.

gl|LoliconGuy so your complete problem could be that you have the wrong timezone file set as default. its also not hard to create your own timezone file using zdump and tic in combination.
Locked