TXT: date +%d%m%Y doesn't work
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
TXT: date +%d%m%Y doesn't work
Hi,
I'm trying to get the date printed on the TXT but this format, which works on Ubuntu and gives e.g. 05022016, gives 'invalid date '%d%m%Y'. How can I get this date correctly on the TXT ?
Thanks,
hvn
I'm trying to get the date printed on the TXT but this format, which works on Ubuntu and gives e.g. 05022016, gives 'invalid date '%d%m%Y'. How can I get this date correctly on the TXT ?
Thanks,
hvn
Re: TXT: date +%d%m%Y doesn't work
Actually the date feature on TXT isnt working. ft (Hartmud Knecht) said to me that it will be fixed in next update.
Re: TXT: date +%d%m%Y doesn't work
Thanks. Will have to wait then.
-
- Administrator
- Beiträge: 583
- Registriert: 26 Dez 2015, 23:49
- Wohnort: Rhein-Main-Gebiet
Re: TXT: date +%d%m%Y doesn't work
Hi hvn,
I just tried "date +%d%m%Y" on a TXT and got the expected output. The date/time is way off, though (that's the problem ski7777 mentioned above - the "real time" clock on the TXT has quite a bit of drift).
My guess is you forgot the '+' in front of the format string. Some version of the "date" utility accept formats without it, but the version on the txt (from busybox) is picky about this.
HTH,
Richard
I just tried "date +%d%m%Y" on a TXT and got the expected output. The date/time is way off, though (that's the problem ski7777 mentioned above - the "real time" clock on the TXT has quite a bit of drift).
My guess is you forgot the '+' in front of the format string. Some version of the "date" utility accept formats without it, but the version on the txt (from busybox) is picky about this.
HTH,
Richard
Re: TXT: date +%d%m%Y doesn't work
Drift and co are no Problem. But I think Ehen you now try to tebbot the TXT by Pressung the powerbutton or disconnecting the power you will see, that date and time are gone.
Raphael
Raphael
-
- Administrator
- Beiträge: 583
- Registriert: 26 Dez 2015, 23:49
- Wohnort: Rhein-Main-Gebiet
Re: TXT: date +%d%m%Y doesn't work
Hi Raphael,
at least on the TXT I have here (bought end of last year, firmware version 4.2.3.0), date and time are kept over both a reboot and disconnecting the power.
Best regards,
Richard
at least on the TXT I have here (bought end of last year, firmware version 4.2.3.0), date and time are kept over both a reboot and disconnecting the power.
Best regards,
Richard
Re: TXT: date +%d%m%Y doesn't work
Hi,
I now notice that I made a small (but significant) mistake: I accidentally put a space between + and %d%m%Y. Without that space I'm getting the correct result: 10022016
hvn
I now notice that I made a small (but significant) mistake: I accidentally put a space between + and %d%m%Y. Without that space I'm getting the correct result: 10022016
hvn
-
- Beiträge: 171
- Registriert: 12 Jan 2016, 09:13
Re: TXT: date +%d%m%Y doesn't work
Hi Raphael,
if your TXT resets the clock if you disconnect the power supply, please check the voltage of the button cell. The voltage should be around 3V.
If you want to set the time and date, use the follwoing guideline:
Markus
if your TXT resets the clock if you disconnect the power supply, please check the voltage of the button cell. The voltage should be around 3V.
If you want to set the time and date, use the follwoing guideline:
- Connect to the TXT via ssh as root.
Set local time and date withWrite local time to the hardware clockCode: Alles auswählen
date -s 2016.02.10-15:55
Code: Alles auswählen
hwclock -wu
Markus
Re: TXT: date +%d%m%Y doesn't work
Hallo Markus,
ich hatte mit Hartdmut telefoniert und sein TXT vergaß Datum u. Uhrzeit auch immer.
Wir hatten aber nur die normale GUI benutzt.
Ich werde das aber gleich mal ausprobieren local am TXT.
Raphael
ich hatte mit Hartdmut telefoniert und sein TXT vergaß Datum u. Uhrzeit auch immer.
Wir hatten aber nur die normale GUI benutzt.
Ich werde das aber gleich mal ausprobieren local am TXT.
Raphael
-
- Beiträge: 171
- Registriert: 12 Jan 2016, 09:13
Re: TXT: date +%d%m%Y doesn't work
Hallo Raphael,
ich hatte von einem Kunden gehört, der dieses Problem hatte, aber ich wusste nicht, dass du das warst. Das Problem kann zwei Ursachen haben: entweder die Spannung der Knopfzelle ist zu niedrig oder der Knopfzellenhalter hat eine defekte Lötstelle (falls das der Fall bei dir ist: schicke uns den TXT Controller zum kostenlosen Ersatz). Im Allgemeinen bleibt die Uhrzeit jedoch erhalten.
Viele Grüße
Markus
ich hatte von einem Kunden gehört, der dieses Problem hatte, aber ich wusste nicht, dass du das warst. Das Problem kann zwei Ursachen haben: entweder die Spannung der Knopfzelle ist zu niedrig oder der Knopfzellenhalter hat eine defekte Lötstelle (falls das der Fall bei dir ist: schicke uns den TXT Controller zum kostenlosen Ersatz). Im Allgemeinen bleibt die Uhrzeit jedoch erhalten.
Viele Grüße
Markus
Re: TXT: date +%d%m%Y doesn't work
Also meine Batterie hat glaube ich 2,6v.
Und den TXT habe ich seit Juli 2015.
Raphael
Und den TXT habe ich seit Juli 2015.
Raphael
-
- Beiträge: 171
- Registriert: 12 Jan 2016, 09:13
Re: TXT: date +%d%m%Y doesn't work
Hallo Raphael,
das ist geradeso zu wenig Spannung. Mit einer Austauschbatterie sollte die Uhrzeit sollte die Uhrzeit erhalten bleiben.
Viele Grüße
Markus
das ist geradeso zu wenig Spannung. Mit einer Austauschbatterie sollte die Uhrzeit sollte die Uhrzeit erhalten bleiben.
Viele Grüße
Markus
Re: TXT: date +%d%m%Y doesn't work
Dann fahr ich gleich mal in eine Filiale der Supermarktkette mit dem gelben E.
Raphael
Raphael
Re: TXT: date +%d%m%Y doesn't work
Das wechseln der Batterie hat das Problem behoben.
Ich weiß jetzt auch nicht ob Hartmut das gleiche Problem hat.
Raphael
Ich weiß jetzt auch nicht ob Hartmut das gleiche Problem hat.
Raphael
-
- Beiträge: 171
- Registriert: 12 Jan 2016, 09:13
Re: TXT: date +%d%m%Y doesn't work
Hallo Raphael,
das freut mich zu hören. Bei Hartmut war es das gleiche Problem.
Viele Grüße
Markus
das freut mich zu hören. Bei Hartmut war es das gleiche Problem.
Viele Grüße
Markus