date command

Forum: DSL Ideas and Suggestions
Topic: date command
started by: whittycat

Posted by whittycat on April 10 2007,09:46
I am new to DSL and one of the things I had to do was set the date. I am used to doing this with the command
   date -s "STRING"
and this returned 'invalid format'. DSL uses the alternative form of the command
   date mmddhhmmyyyy
but I was not aware of that until I looked it up. So you are not wrong but it would be better if the error message were to say 'use the format ...'.
Best wishes,

Posted by mikshaw on April 10 2007,13:08
Individual binary applications are written by various persons or groups outside of the DSL project, and are usually not modified from their original state (unless a change is necessary in order for the program to run in DSL). There are not enough DSL developers to take on the workload needed to maintain changes to outside projects.

Besides, many of the standard tools in DSL are actually Busybox, which is a toolbox of stripped-down versions of common apps. It is not uncommon to see a particular program feature that works in one distro not work in DSL. This was necessary in order to maintain a very small size.

Posted by roberts on April 10 2007,14:03
I do provide an easy to use GUI to set the date.
You can find it on the menu or from the DSLpanel, or from the command line as datetool.lua

Many of the command line utilities will accept the --help option to see what options are supported and their required format, e.g.

date --help

Posted by ^thehatsrule^ on April 10 2007,17:55
If you wish to use the gnu date tool, you can load the gnu-utils extension.
Posted by whittycat on April 11 2007,18:33
Thank you for the explanation. I see that if the date command is provided by busybox there is not much you can do about it. I have, however,  some comments:
1 'date --help' lists the options which include -s STRING but you can't   actually set the date this way; it either has no effect or sets the wrong date. So you are right to say that the format 'date mmddhhmmssyyyy' is the right way to do it.
2 'date --help' says that you get Coordinated Universal Time. I get PDT.
 3 I can't find datetool.lua. 'find' can't find it either.

Well that's enough about date. I'll get on with something useful like Tiny C.


Posted by roberts on April 11 2007,20:02
If no /usr/local/bin/datetool.lua then you must be running an old version of DSL.

If an old version and you are in a daylight savings zone then that would be an issue as well and a reason to upgrade.

You also have the option to run gettime.lua to set date and time from a time server. But likely you don't have that either.


Also, you can set your timezone with a boot option.
Supported timezones are as originally supported by knoppix-autoconfig.

Posted by whittycat on April 14 2007,08:08
This thread began as a mere suggestion so I'd better not let it turn into help; I shall take note of all your advice, for which many thanks.


Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.