Hi All.
I have been chasing dow a tricky bug and think i have finally reached the solution, however after looking through the emoncms.log file this morning after the backup script ran, I see that the times are not 1 hour behind.
I am using a home Linux PC to log all of the data on and the I have got my backup script appending a line into the emoncms.log file when it does things so that I can investigate.
I am guessing that the cause of this is now we have entered BST, so the php script will need updating, but where do I begin?
Jimmy
Re: emoncms.log Time incorrect
Hello Jimmy, you should not need to edit any scripts to deal with BST. Could it be time settings related on your computer?
Re: emoncms.log Time incorrect
Hi,
I thought that as well, However please see the attached homeserv.txt
I have broken the document into logical sections.
First is me running the timezone configurer and its output (Europe / London)
Then the emoncms.log
Before writing anything to it with the new timezone.
Note the 06:18:44.005 Disconnect, then the INFO after that at 7:18
Then the restart of the MQTT_INput script again at 6:18
The next section is me just writing to the emoncms with the php page, so I restarted the MQTT_INPUT service
This still prints the time in UTC
The dbBackup appends the emoncms.log directly from bash, (echo "Some Text" | tee -a /var/log/emoncms.log /var/log/dbBackup.log)
Its not the end of the world, today was the first day that the backup script worked as it should, so I'm very happy about that as I have 5GB of feed data and the mysqldump method is a nightmare on everything, 30+ min downtime to backup on a morning. Using percona Xtrabackup I have <30 seconds of missed feeds, If I move that to 2-3AM It wont be anything to worry about at all.
Oh and incase it matters the system details are
Re: emoncms.log Time incorrect
Interestingly though, creating a php page with the following code
and running it with
returns the correct time: 15:03:16
Hmmm... What generates the date timmestamp for emoncms.log?
Jimmy
Re: emoncms.log Time incorrect
Ok I found it, its in Lib/EmonLogger.php Line 69
Its hard written into the logging script,
I'll adapt my backup script to match...
Jimmy