From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbcAEQIx (ORCPT ); Tue, 5 Jan 2016 11:08:53 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:34557 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbcAEQIw (ORCPT ); Tue, 5 Jan 2016 11:08:52 -0500 Subject: Re: rtc-palmas: correct for bcd year To: Alexandre Belloni References: <1451508726-31769-1-git-send-email-salyzyn@android.com> <20160104161853.GC32724@piout.net> <568AA1C2.2070407@android.com> <20160105000000.GE32724@piout.net> Cc: linux-kernel@vger.kernel.org, Alessandro Zummo , rtc-linux@googlegroups.com From: Mark Salyzyn Message-ID: <568BEA92.2090701@android.com> Date: Tue, 5 Jan 2016 08:08:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160105000000.GE32724@piout.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/04/2016 04:00 PM, Alexandre Belloni wrote: > I'd say that the proper course of action is to refuse to set dates > before 2000 and after 2100. See http://patchwork.ozlabs.org/patch/541037/ Got it. We have an issue though, Android (or rather any embedded) devices must continue to function when date is manually set to any value between 1970 and 2037. The issue here is a fresh device with a recently charged battery will _start_ at 1970 until ntp or cell time/date/locale is set and the device must continue to function in this vacuum. A device reboot should not result in the other calendar values being reset, should the year be wrong, as this will result in a bad user experience. We will have to use a different patch on Android than upstream if dates before 2000 are deprecated. All other factors (rollover, leap) can be corrected by frameworks and runtime since the rtc is generally secondary (ie: first rtc driver was in 1979, created a daemon to correct the flaws in the hardware clock using a cron job) Sincerely -- Mark Salyzyn