[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Re: cron in UTC?



On 29/09/14 17:30, Don Armstrong wrote:
> On Mon, 29 Sep 2014, Tony van der Hoff wrote:
>>> On Wed, 24 Sep 2014 11:54:57 +0100
>> On 24/09/14 16:01, Don Armstrong wrote:
>>> My #1 suggestion is to have system time be GMT, and every shell/user set
>>> TZ appropriately. That's basically the only sane setting, as many time
>>> zones do DST (and change the rules for it from time to time).
>>
>> well, it's my understanding that the system (hardware) time is always
>> UTC, but there is no way to set localtime to GMT (or UTC). Perhaps I'm
>> misunderstanding you.
> 
> There are two different clocks here; there's the system clock which is
> kept by the kernel, which can be in any timezone, and the hardware clock
> which is kept by the motherboard, which is typically in UTC on unix
> machines.
>
OK. Understood.

> To switch the system time, just run
> 
> dpkg-reconfigure tzdata; # as root
> 
> and then select None, then UTC. Voila, your system time is now in UTC.
> 
Thank you; I hadn't spotted that 'None' entry.

>> That would be nice, but there does not appear to be any way to do
>> that.
> 
> There actually is; you edit /etc/pam.d/cron and add a line like
> 
> session       required   pam_env.so envfile=/etc/default/cron_locale
> 
> and add a /etc/default/cron/locale with TZ="UTC".
> 
> But that's complicated.
> 
OK, I'll investigate that; thanks for the info.

-- 
Tony van der Hoff        | mailto:tony@vanderhoff.org
Buckinghamshire, England |


Reply to: