TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: ADRIAN
date: 2018-12-07 14:43:00
subject: Odd date behaviour

Raspbrian 4.9.59-v7

I'm seeing some odd behaviour with date in some stuff that a Pi is
running.

I've got a cron job that runs every minute, calling a bash script.  The
script writes out to a log file every time it runs giving the state of a
sensor, typically four or five lines of output, and each stage starts
with the time, generated by :

date +%H%M

If there is a change in the state of the sensor, then this will be
reported, using just the date command :

echo `date` 

The strange thing is that the entries published every minute are
accurate, but in the change of state entries can be out by anything up
to 9 minutes late, the discrepancy varies.

 From yesterday's log :
0628
----------
thread started


0629
----------
thread started
Thu 6 Dec 06:38:01 GMT 2018 sensor has become inactive


0630
----------
thread started


The sensor did become inactive at 0629 (I triggered it and checked the
time).  NTP is running, so the Pi time is correct.

running
date +%H%M
and
date
from the command line give the same results.

Any suggestions on what is going wrong welcomed.

TIA

Adrian
--
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.