[meta-freescale] The correct way to manage system clock time

Philippe Campos philippe.campos at pcs.fr
Mon Mar 11 08:25:37 PDT 2019


Hi,

After seting the clock :

hwclock --utc --systohc

Cordialement.



Philippe CAMPOS
Tel : +33 559 81 13 30
Mail : philippe.campos at pcs.fr
PCS : http://www.pcs.fr
Hot Line : 0892 350 475



Le lun. 11 mars 2019 à 16:09, Mauro Ziliani <mauro at faresoftware.it> a
écrit :

> Thanks for the answer.
>
> Your idea is a good idea, but it is not applicable to my system because
> it is always offline.
>
>
> My trouble is this.
>
> I put localtime to UTC zone. Suppose the time is March 11, 15:23.
>
> I set the system clock with the date command
>
>
> date --set '2019-03-10  18:00:00'
>
>
> I expect that the system clock now is March 10, 18:00, even if localtime
> is UTC.
>
>
> But this is not true,because when I restart the system the date/time is
> not updated as I like.
>
>
> This beaviour should be an hardware problem of the board?
>
>
> MZ
>
>
> Il 11/03/19 01:01, Bob Cochran ha scritto:
> > On 3/10/19 3:52 PM, Mauro Ziliani wrote:
> >> Hi all.
> >>
> >> I'm working with Krogoth over an imx6dlsabresd derived board. The rtc is
> >> a ds1307.
> >>
> >> Which is the right management of the system clock?
> >
> >
> > I'm not sure whether you're asking about setting the right locale or
> > managing the clock in general.
> >
> > If it's the latter, then maybe this will help:
> >
> > We run the ntp daemon, which goes out to an NTP server to grab the
> > time & date.   This implements the Network Time Protocol.
> >
> > Take a look at the  ntp_4.2.8p12.bb receipe:
> >
> > SUMMARY = "Network Time Protocol daemon and utilities"
> >
> > DESCRIPTION = "The Network Time Protocol (NTP) is used to \
> > synchronize the time of a computer client or server to \
> > another server or reference time source, such as a radio \
> > or satellite receiver or modem."
> >
> > Bob
> >
> >
> >>
> >> The system clock is setup in /etc/default/rcS as UTC=yes
> >>
> >>
> >> If I type the command 'date' in a terminal i get
> >>
> >> [1] March 10, 19:43 UTC 2019
> >>
> >>
> >> [2] I try to set March 10, 23:00 with command 'date 03102300' to set
> >> date.
> >>
> >>
> >> Then I look if the setup is ok and it is. The date is the same I set.
> >>
> >>
> >> I reboot the system, and the date/time has the right vaule.
> >>
> >> When I try the date command, the clock come back a the value 19:43, the
> >> value [1].
> >>
> >>
> >> Why?
> >>
> >>
> >> Best regards,
> >>
> >>    MZ
> >>
> >
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20190311/a120419a/attachment.html>


More information about the meta-freescale mailing list