datetool starting timeForum: DSL Ideas and Suggestions Topic: datetool starting time started by: mikshaw Posted by mikshaw on Aug. 14 2005,13:57
Looking at the datetool I immediately noticed something that threw me off for a minute. The initial date and time displayed are constants rather than the actual current date and time.After messing around a little i came up with a possible solution:
I don't fully understand what the string "%02u" means, but it seems to do the job Posted by roberts on Aug. 14 2005,17:57
I debated whether to do that or not. On some very old computers the hardware clock won't update and hold the date. So then if you use the "dynamic" method, you must start from something very old, like1980 rather than 2005. Maybe, it is "time" that majority rules. I couldn't decide when I wrote it. The 02u is a format string for unsiged integers zero fill of width 2.
Posted by mikshaw on Aug. 14 2005,19:37
I'm not clear on the "very old computers" issue, but I assumed that the above would be essentially the same as what you currently have in your script. The only difference i can see is that when the Datetool is loaded the date command is run once to get the current date and time, and the initial input values are added from date's output rather than being hard-coded into the script. I'm guessing that what you had in mind was quite a bit more precise and dynamic than what I did...something that would constantly update the current time?
Posted by roberts on Aug. 15 2005,17:19
I will go ahead and make it use the BIOS date to start with. You can use the date function in Lua therefore no need to use execute, bash date, tmp file or even an array. Look for this in 1.5.
Posted by mikshaw on Aug. 15 2005,18:28
date function....hmmm...learning new things every day =o)
|