Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-28 Thread Matthias Urlichs
Hi,

Kay Sievers:
> If the system's time zone changes, or the time is adjusted manually,
> we just re-arm all timers, and all should be fine.
> 
> I see no need or use to support explicit triggers on the event of DST
> changes, the system or calendar time support just does not need them.
> 
So, in four hours (as I write this) there will be no 02:* hour for my 02:30
logfile cleanup job to run in. Does my system run it anyway? How do I
change that? (I can see use cases for both options.)

Same thing in the fall.

An explicit trigger can do any number of things to help me prevent problems.
What's even more important IMHO is the presence of a nice "#OnDSTChange="
remark in the spec template, because it teaches admins to actually *think*
about what will happen when DST changes, instead of simply ignoring the
problem and hoping that nothing 'interesting' will happen.

DST changes more often than physically moving a machine to another
timezone, for the vast majority of computers out there. Thus, frankly, it
seems strange to advocate for support of the latter but not the former use
case.

-- 
-- Matthias Urlichs
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-26 Thread Kay Sievers
On Thu, Mar 26, 2015 at 12:06 PM, Lennart Poettering
 wrote:
> On Thu, 26.03.15 11:57, Kay Sievers (k...@vrfy.org) wrote:
>
>> > Now, to make calendar time triggers complete I think we must enable
>> > people to at least trigger on threse three kinds of anomalies in the
>> > time scale. As such I think it would make a *ton* of sense to add:
>> >
>> >  OnTimeZoneChange=
>> >  OnClockChange=
>>
>> These are useful, sure.
>>
>> >  OnDSTChange=
>>
>> This is absolutely not needed and we should not get into that
>> business.
>
> That's just a statement of an opinion. I see no explanation for this.

I see only repeated made-up arguments to add an exotic feature, which
I don't see adding any real value.

DST for the machine is "presentation only". Tools handling it turn the
"presentation" into the actual machine's time and be done with it.
Glibc does that for us today already and it already works sufficiently
for systemd's calendar time support.

If the system's time zone changes, or the time is adjusted manually,
we just re-arm all timers, and all should be fine.

I see no need or use to support explicit triggers on the event of DST
changes, the system or calendar time support just does not need them.

>> There is no need to fiddle with the raw tzfile data here.
>
> Well, it's good that things are so simple for you.

I'm not willing to discuss things in that tone.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-26 Thread Lennart Poettering
On Thu, 26.03.15 11:57, Kay Sievers (k...@vrfy.org) wrote:

> > Now, to make calendar time triggers complete I think we must enable
> > people to at least trigger on threse three kinds of anomalies in the
> > time scale. As such I think it would make a *ton* of sense to add:
> >
> >  OnTimeZoneChange=
> >  OnClockChange=
> 
> These are useful, sure.
> 
> >  OnDSTChange=
> 
> This is absolutely not needed and we should not get into that
> business.

That's just a statement of an opinion. I see no explanation for this.

I think I gave a good explanation why I think we should cover all
three kinds of calendar anomalies. Can you explain why the one anomaly
that happens all the time, on pretty much everybody's system you
consider irrelevant?

> > I strongly believe that it is our duty to make the non-monotonicity of
> > the calendar time scale as managable as possible for admins, and that
> > not only includes triggers on DST changes, but in fact the DST changes
> > are probably the most important kind of anomaly on the calendar scale,
> > since even a completely NTP controlled, physically fixed system will
> > experience them regularly, in contrast to the other kinds of
> > anomalies.
> 
> DST support works all fine already today. I don't see any need for
> parsing the tz files here to solve an actual existing problem.

True. And sysvinit worked "fine already today" too.

It's not a question on wether something works fine or not, it's a
question of actually solving real problems.

If you think that DST handling for timer triggers is not a problem, then
you live in a very simple world.

> > So yeah, Kay, I think this should be readded and be made useful for
> > timer units. And if we make use of this for the timer units we might
> > as well show it in timedatectl...
> 
> No, it shouldn't.
> 
> We should stay out of the DST business. Glibc calculates everything
> just fine for all needed tasks and we arm the timers accordingly.
> There is no need to fiddle with the raw tzfile data here.

Well, it's good that things are so simple for you. But calendar time
handling is really not that simple. You *have* to think of DST. And if
you don't you just avoid dealing with the complexity it brings.

You know, Kay, DST is a real thing. It's an ugly thing, and we all
wish it would not exist. But well, it does, and we better deal with it
and make it managable.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-26 Thread Kay Sievers
On Thu, Mar 26, 2015 at 11:48 AM, Lennart Poettering
 wrote:
> On Tue, 24.03.15 07:04, Kay Sievers (k...@kemper.freedesktop.org) wrote:
>
>>  Makefile.am|2
>>  src/shared/time-dst.c  |  329 
>> -
>>  src/shared/time-dst.h  |   26 ---
>>  src/timedate/timedatectl.c |   56 ---
>>  4 files changed, 413 deletions(-)
>>
>> New commits:
>> commit 16c6ea29348ddac73998f339166f863bee0dfef6
>> Author: Kay Sievers 
>> Date:   Tue Mar 24 13:52:04 2015 +0100
>>
>> timedate: remove daylight saving time handling and tzfile parser
>>
>> We planned to support (the conceptually broken) daylight saving
>> time/local time features in the kernel, SCSI, networking, FAT
>> filesystem, but it turned out to be a race we cannot win and do
>> not want to get involved. Systemd should not fiddle with daylight
>> saving time or parse timezone information itself.
>>
>> Leave everything to glibc or tools like date(1) and do not make any
>> promises or raise expectations that systemd should handle anything
>> like this.
>
> For what's it worth, I strongly disagree with the removal of this.
>
> We do provide OnCalendar= triggers in timer units. They trigger on
> calendar time, not on UTC time, and are hence subject to local clock
> changes, to local timezone changes, and to the DST changes of the
> local timezone. Their time scale is non-linear due to this: it
> *mostly* is linear, but under any of these three conditions it will
> not be linear anymore, it will jump.
>
> Now, to make calendar time triggers complete I think we must enable
> people to at least trigger on threse three kinds of anomalies in the
> time scale. As such I think it would make a *ton* of sense to add:
>
>  OnTimeZoneChange=
>  OnClockChange=

These are useful, sure.

>  OnDSTChange=

This is absolutely not needed and we should not get into that business.

> settings to .timer units, so that users can explictly watch for any of
> them, either separately of the actual calendar expressions, or in
> addition to them.
>
> If we do have all four of OnCalendar=, OnTimeZoneChange=,
> OnClockChange= and OnDSTChange= in place, then for the first time we
> actually can express timer events in a complete way, and the anomalies
> of the wallclock time scale becomes *manageable*, for the first time.
>
> Just removing this code blindly appears misguided to me. It just means
> sticking the head in the sand, ignoring completely the fact that we
> *do* already provide OnCalendar= timer units, and ignoring that their
> time scale is so weirdly non-monotonic. And we leave our users in the
> cold, because we provide them with no way to manage the fuckup that
> DST is.
>
> I strongly believe that it is our duty to make the non-monotonicity of
> the calendar time scale as managable as possible for admins, and that
> not only includes triggers on DST changes, but in fact the DST changes
> are probably the most important kind of anomaly on the calendar scale,
> since even a completely NTP controlled, physically fixed system will
> experience them regularly, in contrast to the other kinds of
> anomalies.

DST support works all fine already today. I don't see any need for
parsing the tz files here to solve an actual existing problem.

> So yeah, Kay, I think this should be readded and be made useful for
> timer units. And if we make use of this for the timer units we might
> as well show it in timedatectl...

No, it shouldn't.

We should stay out of the DST business. Glibc calculates everything
just fine for all needed tasks and we arm the timers accordingly.
There is no need to fiddle with the raw tzfile data here.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-26 Thread Lennart Poettering
On Tue, 24.03.15 07:04, Kay Sievers (k...@kemper.freedesktop.org) wrote:

>  Makefile.am|2 
>  src/shared/time-dst.c  |  329 
> -
>  src/shared/time-dst.h  |   26 ---
>  src/timedate/timedatectl.c |   56 ---
>  4 files changed, 413 deletions(-)
> 
> New commits:
> commit 16c6ea29348ddac73998f339166f863bee0dfef6
> Author: Kay Sievers 
> Date:   Tue Mar 24 13:52:04 2015 +0100
> 
> timedate: remove daylight saving time handling and tzfile parser
> 
> We planned to support (the conceptually broken) daylight saving
> time/local time features in the kernel, SCSI, networking, FAT
> filesystem, but it turned out to be a race we cannot win and do
> not want to get involved. Systemd should not fiddle with daylight
> saving time or parse timezone information itself.
> 
> Leave everything to glibc or tools like date(1) and do not make any
> promises or raise expectations that systemd should handle anything
> like this.

For what's it worth, I strongly disagree with the removal of this. 

We do provide OnCalendar= triggers in timer units. They trigger on
calendar time, not on UTC time, and are hence subject to local clock
changes, to local timezone changes, and to the DST changes of the
local timezone. Their time scale is non-linear due to this: it
*mostly* is linear, but under any of these three conditions it will
not be linear anymore, it will jump.

Now, to make calendar time triggers complete I think we must enable
people to at least trigger on threse three kinds of anomalies in the
time scale. As such I think it would make a *ton* of sense to add:

 OnTimeZoneChange=
 OnClockChange=
 OnDSTChange=

settings to .timer units, so that users can explictly watch for any of
them, either separately of the actual calendar expressions, or in
addition to them. 

If we do have all four of OnCalendar=, OnTimeZoneChange=,
OnClockChange= and OnDSTChange= in place, then for the first time we
actually can express timer events in a complete way, and the anomalies
of the wallclock time scale becomes *manageable*, for the first time.

Just removing this code blindly appears misguided to me. It just means
sticking the head in the sand, ignoring completely the fact that we
*do* already provide OnCalendar= timer units, and ignoring that their
time scale is so weirdly non-monotonic. And we leave our users in the
cold, because we provide them with no way to manage the fuckup that
DST is.

I strongly believe that it is our duty to make the non-monotonicity of
the calendar time scale as managable as possible for admins, and that
not only includes triggers on DST changes, but in fact the DST changes
are probably the most important kind of anomaly on the calendar scale,
since even a completely NTP controlled, physically fixed system will
experience them regularly, in contrast to the other kinds of
anomalies.

So yeah, Kay, I think this should be readded and be made useful for
timer units. And if we make use of this for the timer units we might
as well show it in timedatectl...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-24 Thread Kay Sievers
On Tue, Mar 24, 2015 at 4:07 PM, Zbigniew Jędrzejewski-Szmek
 wrote:
> On Tue, Mar 24, 2015 at 03:32:31PM +0100, Kay Sievers wrote:
>> On Tue, Mar 24, 2015 at 3:24 PM, Zbigniew Jędrzejewski-Szmek
>>  wrote:
>> > On Tue, Mar 24, 2015 at 07:04:11AM -0700, Kay Sievers wrote:
>> >>  Makefile.am|2
>> >>  src/shared/time-dst.c  |  329 
>> >> -
>> >>  src/shared/time-dst.h  |   26 ---
>> >>  src/timedate/timedatectl.c |   56 ---
>> >>  4 files changed, 413 deletions(-)
>> >>
>> >> New commits:
>> >> commit 16c6ea29348ddac73998f339166f863bee0dfef6
>> >> Author: Kay Sievers 
>> >> Date:   Tue Mar 24 13:52:04 2015 +0100
>> >>
>> >> timedate: remove daylight saving time handling and tzfile parser
>> >>
>> >> We planned to support (the conceptually broken) daylight saving
>> >> time/local time features in the kernel, SCSI, networking, FAT
>> >> filesystem, but it turned out to be a race we cannot win and do
>> >> not want to get involved. Systemd should not fiddle with daylight
>> >> saving time or parse timezone information itself.
>> >>
>> >> Leave everything to glibc or tools like date(1) and do not make any
>> >> promises or raise expectations that systemd should handle anything
>> >> like this.
>> >
>> > That just doesn't make sense. This was *extremely* useful functionality.
>>
>> Sure, it was useful, it was still not the right place to solve it.
>> With the decision not to support any DST stuff in systemd itself, DST
>> parsing did not belong here. Maybe in date(1) or any other tool.
>
> But we cannot pretend timezones don't exists. timedatectl *is* a
> high-level tool — the whole point of it's existence was to provide a
> nice wrapper around the dbus api to set the timezone. The fact that it
> could be used to set timezones and query it in an easy way made it
> worthwhile. I don't see anything wrong with the fact that a tool
> which allows setting the system timezone also allows displaying some
> useful details about the time and timezone. There was nothing wrong
> with this functionality in general, only a small issue with conversion
> of remote-to-local, which we should work out instead of throwing out
> the baby with the bathwater.

Well, we need to limit what we do or we will end up in a total mess.

With your usual rush to apply not thought-through things people ask
for, and your arguments based on the actual status quo instead of a
definition/vision what we want to solve in general and where we want
to go, I needed to make things simpler to stop giving the wrong
impression here.

With the feature removed, it is clear, that systemd has no business in
localtime presentation or DST handling and that is for sure enough
justification to remove it.

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-24 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Mar 24, 2015 at 03:32:31PM +0100, Kay Sievers wrote:
> On Tue, Mar 24, 2015 at 3:24 PM, Zbigniew Jędrzejewski-Szmek
>  wrote:
> > On Tue, Mar 24, 2015 at 07:04:11AM -0700, Kay Sievers wrote:
> >>  Makefile.am|2
> >>  src/shared/time-dst.c  |  329 
> >> -
> >>  src/shared/time-dst.h  |   26 ---
> >>  src/timedate/timedatectl.c |   56 ---
> >>  4 files changed, 413 deletions(-)
> >>
> >> New commits:
> >> commit 16c6ea29348ddac73998f339166f863bee0dfef6
> >> Author: Kay Sievers 
> >> Date:   Tue Mar 24 13:52:04 2015 +0100
> >>
> >> timedate: remove daylight saving time handling and tzfile parser
> >>
> >> We planned to support (the conceptually broken) daylight saving
> >> time/local time features in the kernel, SCSI, networking, FAT
> >> filesystem, but it turned out to be a race we cannot win and do
> >> not want to get involved. Systemd should not fiddle with daylight
> >> saving time or parse timezone information itself.
> >>
> >> Leave everything to glibc or tools like date(1) and do not make any
> >> promises or raise expectations that systemd should handle anything
> >> like this.
> >
> > That just doesn't make sense. This was *extremely* useful functionality.
> 
> Sure, it was useful, it was still not the right place to solve it.
> With the decision not to support any DST stuff in systemd itself, DST
> parsing did not belong here. Maybe in date(1) or any other tool.

But we cannot pretend timezones don't exists. timedatectl *is* a
high-level tool — the whole point of it's existence was to provide a
nice wrapper around the dbus api to set the timezone. The fact that it
could be used to set timezones and query it in an easy way made it
worthwhile. I don't see anything wrong with the fact that a tool
which allows setting the system timezone also allows displaying some
useful details about the time and timezone. There was nothing wrong
with this functionality in general, only a small issue with conversion
of remote-to-local, which we should work out instead of throwing out
the baby with the bathwater.

> Systemd's job is not to cover exotic features missing in other tools.
> It was removed to stop misguiding people that systemd should to
> provide any of these things on the bus or in its APIs, just because it
> could provide it. In the longer-term this would just end up in a
> half-baked mess, which we need to make sure will not happen.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-24 Thread Kay Sievers
On Tue, Mar 24, 2015 at 3:24 PM, Zbigniew Jędrzejewski-Szmek
 wrote:
> On Tue, Mar 24, 2015 at 07:04:11AM -0700, Kay Sievers wrote:
>>  Makefile.am|2
>>  src/shared/time-dst.c  |  329 
>> -
>>  src/shared/time-dst.h  |   26 ---
>>  src/timedate/timedatectl.c |   56 ---
>>  4 files changed, 413 deletions(-)
>>
>> New commits:
>> commit 16c6ea29348ddac73998f339166f863bee0dfef6
>> Author: Kay Sievers 
>> Date:   Tue Mar 24 13:52:04 2015 +0100
>>
>> timedate: remove daylight saving time handling and tzfile parser
>>
>> We planned to support (the conceptually broken) daylight saving
>> time/local time features in the kernel, SCSI, networking, FAT
>> filesystem, but it turned out to be a race we cannot win and do
>> not want to get involved. Systemd should not fiddle with daylight
>> saving time or parse timezone information itself.
>>
>> Leave everything to glibc or tools like date(1) and do not make any
>> promises or raise expectations that systemd should handle anything
>> like this.
>
> That just doesn't make sense. This was *extremely* useful functionality.

Sure, it was useful, it was still not the right place to solve it.
With the decision not to support any DST stuff in systemd itself, DST
parsing did not belong here. Maybe in date(1) or any other tool.

Systemd's job is not to cover exotic features missing in other tools.
It was removed to stop misguiding people that systemd should to
provide any of these things on the bus or in its APIs, just because it
could provide it. In the longer-term this would just end up in a
half-baked mess, which we need to make sure will not happen.

Thanks,
Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-24 Thread Tom Gundersen
On Tue, Mar 24, 2015 at 3:24 PM, Zbigniew Jędrzejewski-Szmek
 wrote:
> On Tue, Mar 24, 2015 at 07:04:11AM -0700, Kay Sievers wrote:
>>  Makefile.am|2
>>  src/shared/time-dst.c  |  329 
>> -
>>  src/shared/time-dst.h  |   26 ---
>>  src/timedate/timedatectl.c |   56 ---
>>  4 files changed, 413 deletions(-)
>>
>> New commits:
>> commit 16c6ea29348ddac73998f339166f863bee0dfef6
>> Author: Kay Sievers 
>> Date:   Tue Mar 24 13:52:04 2015 +0100
>>
>> timedate: remove daylight saving time handling and tzfile parser
>>
>> We planned to support (the conceptually broken) daylight saving
>> time/local time features in the kernel, SCSI, networking, FAT
>> filesystem, but it turned out to be a race we cannot win and do
>> not want to get involved. Systemd should not fiddle with daylight
>> saving time or parse timezone information itself.
>>
>> Leave everything to glibc or tools like date(1) and do not make any
>> promises or raise expectations that systemd should handle anything
>> like this.
>
> That just doesn't make sense. This was *extremely* useful functionality.

Yeah, made me cry to see it go. However, I must admit I'm convinced by
the argument that this really does not belong in timedatectl. Going
down that road we could have displayed a ton of similar more-or-less
useful information, but that really is not the job of such a low-level
tool.

>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 29cfec5..93fdbc2 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -843,8 +843,6 @@ libsystemd_shared_la_SOURCES = \
>>   src/shared/spawn-polkit-agent.h \
>>   src/shared/clock-util.c \
>>   src/shared/clock-util.h \
>> - src/shared/time-dst.c \
>> - src/shared/time-dst.h \
>>   src/shared/calendarspec.c \
>>   src/shared/calendarspec.h \
>>   src/shared/fileio.c \
>> diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
>> deleted file mode 100644
>> index 2797d1a..000
>> --- a/src/shared/time-dst.c
>> +++ /dev/null
>> @@ -1,329 +0,0 @@
>> -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
>> -
>> -/***
>> -  This file is part of systemd.
>> -
>> -  Timezone file reading code from glibc 2.16.
>> -
>> -  Copyright (C) 1991-2012 Free Software Foundation, Inc.
>> -  Copyright 2012 Kay Sievers
>> -
>> -  systemd is free software; you can redistribute it and/or modify it
>> -  under the terms of the GNU Lesser General Public License as published by
>> -  the Free Software Foundation; either version 2.1 of the License, or
>> -  (at your option) any later version.
>> -
>> -  systemd is distributed in the hope that it will be useful, but
>> -  WITHOUT ANY WARRANTY; without even the implied warranty of
>> -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
>> -  Lesser General Public License for more details.
>> -
>> -  You should have received a copy of the GNU Lesser General Public License
>> -  along with systemd; If not, see .
>> -***/
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -#include 
>> -
>> -#include "time-dst.h"
>> -#include "util.h"
>> -
>> -/*
>> - * If tzh_version is '2' or greater, the above is followed by a second 
>> instance
>> - * of tzhead and a second instance of the data in which each coded 
>> transition
>> - * time uses 8 rather than 4 chars, then a 
>> POSIX-TZ-environment-variable-style
>> - * string for use in handling instants after the last transition time 
>> stored in
>> - * the file * (with nothing between the newlines if there is no POSIX
>> - * representation for such instants).
>> - */
>> -#define TZ_MAGIC"TZif"
>> -struct tzhead {
>> -char tzh_magic[4];  /* TZ_MAGIC */
>> -char tzh_version[1];/* '\0' or '2' as of 2005 */
>> -char tzh_reserved[15];  /* reserved--must be zero */
>> -char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
>> -char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
>> -char tzh_leapcnt[4];/* coded number of leap seconds */
>> -char tzh_timecnt[4];/* coded number of transition times */
>> -char tzh_typecnt[4];/* coded number of local time types */
>> -char tzh_charcnt[4];/* coded number of abbr. chars */
>> -};
>> -
>> -struct ttinfo {
>> -long int offset;/* Seconds east of GMT.  */
>> -unsigned char isdst;/* Used to set tm_isdst.  */
>> -unsigned char idx;  /* Index into `zone_names'.  */
>> -unsigned char isstd;/* Transition times are in standard time.  
>> */
>> -unsigned char isgmt;/* Transition times are in GMT.  */
>> -};
>> -
>> -struct leap {
>> -time_t transition;  /* Time the transition takes effect.  */
>> -long int change;/* Seconds of correction to ap

Re: [systemd-devel] [systemd-commits] Makefile.am src/shared src/timedate

2015-03-24 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Mar 24, 2015 at 07:04:11AM -0700, Kay Sievers wrote:
>  Makefile.am|2 
>  src/shared/time-dst.c  |  329 
> -
>  src/shared/time-dst.h  |   26 ---
>  src/timedate/timedatectl.c |   56 ---
>  4 files changed, 413 deletions(-)
> 
> New commits:
> commit 16c6ea29348ddac73998f339166f863bee0dfef6
> Author: Kay Sievers 
> Date:   Tue Mar 24 13:52:04 2015 +0100
> 
> timedate: remove daylight saving time handling and tzfile parser
> 
> We planned to support (the conceptually broken) daylight saving
> time/local time features in the kernel, SCSI, networking, FAT
> filesystem, but it turned out to be a race we cannot win and do
> not want to get involved. Systemd should not fiddle with daylight
> saving time or parse timezone information itself.
> 
> Leave everything to glibc or tools like date(1) and do not make any
> promises or raise expectations that systemd should handle anything
> like this.

That just doesn't make sense. This was *extremely* useful functionality.

Zbyszek

> 
> diff --git a/Makefile.am b/Makefile.am
> index 29cfec5..93fdbc2 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -843,8 +843,6 @@ libsystemd_shared_la_SOURCES = \
>   src/shared/spawn-polkit-agent.h \
>   src/shared/clock-util.c \
>   src/shared/clock-util.h \
> - src/shared/time-dst.c \
> - src/shared/time-dst.h \
>   src/shared/calendarspec.c \
>   src/shared/calendarspec.h \
>   src/shared/fileio.c \
> diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
> deleted file mode 100644
> index 2797d1a..000
> --- a/src/shared/time-dst.c
> +++ /dev/null
> @@ -1,329 +0,0 @@
> -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
> -
> -/***
> -  This file is part of systemd.
> -
> -  Timezone file reading code from glibc 2.16.
> -
> -  Copyright (C) 1991-2012 Free Software Foundation, Inc.
> -  Copyright 2012 Kay Sievers
> -
> -  systemd is free software; you can redistribute it and/or modify it
> -  under the terms of the GNU Lesser General Public License as published by
> -  the Free Software Foundation; either version 2.1 of the License, or
> -  (at your option) any later version.
> -
> -  systemd is distributed in the hope that it will be useful, but
> -  WITHOUT ANY WARRANTY; without even the implied warranty of
> -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> -  Lesser General Public License for more details.
> -
> -  You should have received a copy of the GNU Lesser General Public License
> -  along with systemd; If not, see .
> -***/
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include "time-dst.h"
> -#include "util.h"
> -
> -/*
> - * If tzh_version is '2' or greater, the above is followed by a second 
> instance
> - * of tzhead and a second instance of the data in which each coded transition
> - * time uses 8 rather than 4 chars, then a 
> POSIX-TZ-environment-variable-style
> - * string for use in handling instants after the last transition time stored 
> in
> - * the file * (with nothing between the newlines if there is no POSIX
> - * representation for such instants).
> - */
> -#define TZ_MAGIC"TZif"
> -struct tzhead {
> -char tzh_magic[4];  /* TZ_MAGIC */
> -char tzh_version[1];/* '\0' or '2' as of 2005 */
> -char tzh_reserved[15];  /* reserved--must be zero */
> -char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
> -char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
> -char tzh_leapcnt[4];/* coded number of leap seconds */
> -char tzh_timecnt[4];/* coded number of transition times */
> -char tzh_typecnt[4];/* coded number of local time types */
> -char tzh_charcnt[4];/* coded number of abbr. chars */
> -};
> -
> -struct ttinfo {
> -long int offset;/* Seconds east of GMT.  */
> -unsigned char isdst;/* Used to set tm_isdst.  */
> -unsigned char idx;  /* Index into `zone_names'.  */
> -unsigned char isstd;/* Transition times are in standard time.  */
> -unsigned char isgmt;/* Transition times are in GMT.  */
> -};
> -
> -struct leap {
> -time_t transition;  /* Time the transition takes effect.  */
> -long int change;/* Seconds of correction to apply.  */
> -};
> -
> -static inline int decode(const void *ptr) {
> -return be32toh(*(int *)ptr);
> -}
> -
> -static inline int64_t decode64(const void *ptr) {
> -return be64toh(*(int64_t *)ptr);
> -}
> -
> -int time_get_dst(time_t date, const char *tzfile,
> - time_t *switch_cur, char **zone_cur, bool *dst_cur,
> - time_t *switch_next, int *delta_next, char **zone_next, 
> bool *dst_next) {
> -unsig