Deutsch English Français Italiano |
<llrhc7FdfgrU6@mid.individual.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: vallor <vallor@cultnix.org> Newsgroups: comp.os.linux.advocacy Subject: Re: Does Dimdows Know What Time It Is? Date: 28 Sep 2024 23:21:43 GMT Lines: 37 Message-ID: <llrhc7FdfgrU6@mid.individual.net> References: <vda0ko$1e457$1@dont-email.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net eneT5YgfxwWapg4ss5FEkwc+osDQF5RUKBf82Ta9TKTFdpnZ0j Cancel-Lock: sha1:lLDQ3szHAW9P3KMqBrReqwmeUaU= sha256:jDmhqlgOz35SLz3K6cCp8Io30YA/Try9ohM0gJ1FiCI= X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl CaKku`)]}.V/"6rISCIDP` User-Agent: Pan/0.160 (Toresk; 00146837; Linux-6.11.0) Bytes: 2432 On Sat, 28 Sep 2024 22:40:24 -0000 (UTC), Lawrence D'Oliveiro <ldo@nz.invalid> wrote in <vda0ko$1e457$1@dont-email.me>: > Something Unix did that was different from most other OSes was, its > system clock kept time in UTC (or GMT, in pre-UTC days). Linux does the > same. > When you use a command like “date” to see what the current date and time > is, it converts that UTC time to a local time in some specified > timezone. Changing the timezone is as easy as specifying a new value for > the TZ environment variable. > > Windows, on the other hand, keeps its system clock in local time, in > some specific time zone that is assumed to apply systemwide. > > This is a particularly dumb idea when you realize how much it > complicates things if your time zone has daylight saving time. We have > seen this sort of thing happen on Windows systems before, where they > might forget to adjust the clock to start/stop daylight saving, or even > adjust it twice so you end up being an hour off in the opposite > direction. > > This can’t happen on Linux systems, because there is no turning daylight > saving “on” or “off” as such: there is simply a table of local time > offsets (from the “tzdata” files), and the correct offset to apply > depends only on the actual UTC time value, not on the current setting of > any system flag. > > This also makes it easy to convert between UTC and local times at any > time in the past, for any time zone. $ echo $TZ $ ls -l /etc/localtime lrwxrwxrwx 1 root root 39 Jul 16 07:50 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles -- -v