baboom09 / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

Date format mismatch (from/to) in help #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./smatool -h
2. ./smatool -from "2011-31-03 00:00:00" -to "2011-31-03 23:55:00"
3.

What is the expected output? What do you see instead?
  -from  --datefrom YYYY-DD-MM HH:MM:00    Date range from date
  -to  --dateto YYYY-DD-MM HH:MM:00        Date range to date

<b>Time Coversion Error</b>

What version of the product are you using? On what operating system?
0.11 on ubuntu 10.04

Please provide any additional information below.

should be YYYY-MM-DD (see sourcecode: "%Y-%m-%d %H:%M:%S")

case 13: // $TIMEFROM1  
// get report time and convert
  if( daterange == 1 ) {
    if( strptime( datefrom, "%Y-%m-%d %H:%M:%S", &tm) == (time_t)NULL ) 
      {
        if( debug==1 ) printf( "datefrom %s\n", datefrom );
        printf( "Time Coversion Error\n" );
        error=1;
        exit(-1);
      }

As this is confusing, it's better to correct this in the next release. Also the 
type in "coversion" :-)

thanks,
Luc

Good job!! Great tool

Original issue reported on code.google.com by luc.van....@skynet.be on 1 Apr 2011 at 1:34

GoogleCodeExporter commented 8 years ago

Original comment by stephenb...@gmail.com on 20 Apr 2011 at 5:56

GoogleCodeExporter commented 8 years ago
This has been added to code

Original comment by stephenb...@gmail.com on 27 Feb 2013 at 7:13