Page 1 of 1

Timst bug

Posted: Mon Jun 29, 2015 1:11 am
by stex2727
Is this a bug?

On the code below run on 10.1.1 anything less than one minute adds a minute to the formatted output. That is, for 18 seconds below I get 00:01:18

Code: Select all

rough18Sec = (18/86400);
asciioutput('_test.txt', TIMST(rough18Sec, '\h:\m:\s', 0));

Re: Timst bug

Posted: Mon Jun 29, 2015 2:17 am
by rmackenzie
stex2727 wrote:Is this a bug?
No - \m is month. You should use \i for seconds. You are getting 01 for the month because it is defaulting to 1960-01-01. Try it like this:

Code: Select all

rough18Sec = (18 / 86400);
asciioutput ( '_test.txt', TIMST ( rough18Sec, '\Y\m\d\h\i\s' ) );

Re: Timst bug

Posted: Mon Jun 29, 2015 3:14 am
by stex2727
ta,

I'd like to think that's the last time I make that mistake, but I suspect not