WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wrong dates on files after reboot  (Read 4751 times)

Offline vladosam

  • Newbie
  • *
  • Posts: 11
Wrong dates on files after reboot
« on: April 13, 2016, 03:09:40 PM »
Hi everyone. I have problem with picore7.0. Afther restart usr/local/lib/python3.4/site-packages change date to 1.1.1970. I have set static ip. And also correct TZ in cmdline.txt. In bootlocal.sh i have /etc/init.d/settime.sh. Date command gives me right time and date. I noticed if i run filetool.sh -r all persistent folder changes to current date and time but files dont. This is content of .filetool.lst
opt
home
etc/passwd
etc/shadow
etc/group
etc/gshadow
usr/local/etc/ssh
usr/local/lib/python3.4/site-packages
What am i doing wrong?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Wrong dates on files after reboot
« Reply #1 on: April 13, 2016, 04:26:51 PM »
In bootlocal.sh i have /etc/init.d/settime.sh.

It is not needed, time is set by the system during startup.
« Last Edit: April 13, 2016, 04:30:11 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline vladosam

  • Newbie
  • *
  • Posts: 11
Re: Wrong dates on files after reboot
« Reply #2 on: April 13, 2016, 04:36:08 PM »
I removed /etc/init.d/settime.sh from bootlocal.sh now date command gives my 1.1.1970?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Wrong dates on files after reboot
« Reply #3 on: April 14, 2016, 01:24:21 AM »
Sorry I missed static IP. In such case you need it.

bootlocal is executed at the end os startup process. When backup files restored, no time set (except having an RTC), so system date is 1.1.1970
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline vladosam

  • Newbie
  • *
  • Posts: 11
Re: Wrong dates on files after reboot
« Reply #4 on: April 14, 2016, 02:09:23 AM »
That is a problem for me. But I find a solution for that. I can use touch command before start some updates. Thanks.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Wrong dates on files after reboot
« Reply #5 on: April 14, 2016, 02:40:49 AM »
That is a problem for me.

Why is it a problem?

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline vladosam

  • Newbie
  • *
  • Posts: 11
Re: Wrong dates on files after reboot
« Reply #6 on: April 14, 2016, 02:49:17 AM »
I want to make home automation server. So when I install python homassistant server everything is ok. I make it persistent restart and so on. But when I updated it after restart there is a ton of errors in the log about can't find files, dates not ok etc.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Wrong dates on files after reboot
« Reply #7 on: April 14, 2016, 02:50:06 AM »
I want to make home automation server. So when I install python homassistant server everything is ok. I make it persistent restart and so on. But when I updated it after restart there is a ton of errors in the log about can't find files, dates not ok etc.

Install RTC
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline vladosam

  • Newbie
  • *
  • Posts: 11
Re: Wrong dates on files after reboot
« Reply #8 on: April 14, 2016, 02:57:38 AM »
Yea. That is what I'm gona do. :) I enjoy using picore. It's the best tool for my little project.  Thanks again.