TimeZone and rsyslog

Hi,

I have set up a syslog server to receive all messages from all my emonPIs by installing rsyslog on each emonPi. Once the messages started to come into the server, I noticed all messages had UTC timestamps. So, upon checking raspi-config, I see that the Pi is set to UTC. I changed it to local time, and all is working well, but then I started wondering if this would affect my feeds at all. I haven’t noticed anything, but thought I would reach out to the community to see if this is going to affect anything emonCMS-wise.

Please advise.

Thank you,

Gordon

All the below is based on the “time” in the Pi being correct i.e. 07:00+00:00 is the same as 08:00+01:00.

Epoch Converter - Unix Timestamp Converter

The ‘timestamp’ you see is just a representation of the underlying number that is the actual date & time and this number exactly the same at any one instant across the whole globe. This number is a 10 digit integer representing seconds since the Epoch. If it is milliseconds, it is a 13 digit number.

emoncms stores this number.

Visually, this can cause issues if you want to know what the temperature of the room was at midday in the UK, but you were viewing your data in New Zealand.

Whilst the data may have looked an hour out in rsyslog, it wasn’t and the fact it includes a +00:00 or a +01:00 makes no difference to the underlying ‘time’ - it is just a visual representation of it.

Just to note - always avoid using Z to represent UTC DTG - some systems will take that as local time. Always use +00:00.

1 Like

Brian, thank you for the clarification. This is helpful - just wanted to be sure I wasn’t breaking anything.

Best regards,

Gordon

1 Like