Store PLCnext CommunityPLCnext on LinkedInPLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

Resolved Local time

0
Votes
Undo
  1. Stefan Svanbäck
  2. PLCnext Technology & PLCnext Controls
  3. Friday, 12 February 2021

Hi,

We enabled ntp for update time on PLC and that works fine.

The problem is that the log-files entries is not using this time.

Is it possible to set the plc to use the local time instead?

Best regards Stefan

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Stefan,

The Output.log file timestamps all records with Universal time, and this can't be changed at the moment (sorry). If this is important, please raise this with your local Phoenix Contact support people, who can suggest this as a requirement for a future firmware version, if necessary.

~ Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
adrlzr Accepted Answer Pending Moderation
0
Votes
Undo

Strange, Martin... are you sure?

I have managed to change the local time on the controller with basic Linux knowledge:

Login via SSH to the controller and run:

su # insert the root password
nano /etc/timezone
# Replace Universal with: Europe/Amsterdam
/etc/init.d/ntpd status
# Check that it is running, if not:
/etc/init.d/ntpd start

ls -l /etc/localtime
# lrwxrwxrwx 1 root root 29 Mar  9  2018 /etc/localtime -> /usr/share/zoneinfo/Universal
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
# Check the link is created and the time is right
ls -l /etc/localtime
date

 

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Yes, of course it is possible to change the time zone.

But, unless I am missing something, this does not change the timestamps in the Output.log file, which are always in Universal time.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
adrlzr Accepted Answer Pending Moderation
0
Votes
Undo

Indeed you are right Martin. The Output.log file is stuck with Universal time.

What are the technical reasons for that? Why not bind the time of the logger with the Linux distribution internal time stamp?

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

I'm not sure of the reason for that design decision. It does sort of make sense - since there is no time zone information shown with the timestamps in the Output.log file, the assumption must be that it is Universal time. The alternative would be to indicate the timezone with each timestamp value in the Output.log file. If this is a requirement for your application, please raise this with your automation support contact in your local Phoenix Contact office, and they can start the internal processes here if necessary.

~ Martin.

Phoenix Contact Electronics Headquarters - PLCnext Runtime Product Management and Support
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.