projects
/
gnucomo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A date without the time for the '-d <date> option will
[gnucomo.git]
/
src
/
gcm_input
/
gcm_input.cpp
diff --git
a/src/gcm_input/gcm_input.cpp
b/src/gcm_input/gcm_input.cpp
index
9102cdd
..
147ea5f
100644
(file)
--- a/
src/gcm_input/gcm_input.cpp
+++ b/
src/gcm_input/gcm_input.cpp
@@
-7,7
+7,7
@@
***********************
** FILE NAME : gcm_input.cpp
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
***********************
** FILE NAME : gcm_input.cpp
** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
-** VERSION NUMBER : $Revision: 1.
8
$
+** VERSION NUMBER : $Revision: 1.
9
$
**
** DESCRIPTION : Application to store client messages into the database
** The client message contains a log file from one of the
**
** DESCRIPTION : Application to store client messages into the database
** The client message contains a log file from one of the
@@
-54,7
+54,11
@@
/*****************************
$Log: gcm_input.cpp,v $
/*****************************
$Log: gcm_input.cpp,v $
- Revision 1.8 2003-08-16 15:30:19 arjen
+ Revision 1.9 2003-09-01 06:59:26 arjen
+ A date without the time for the '-d <date> option will
+ assume midnight on that date.
+
+ Revision 1.8 2003/08/16 15:30:19 arjen
Fixed a gcc 2 vs. gcc 3 problem
Revision 1.7 2003/08/14 10:28:37 arjen
Fixed a gcc 2 vs. gcc 3 problem
Revision 1.7 2003/08/14 10:28:37 arjen
@@
-93,7
+97,7
@@
*****************************/
*****************************/
-static const char *RCSID = "$Id: gcm_input.cpp,v 1.
8 2003-08-16 15:30:19
arjen Exp $";
+static const char *RCSID = "$Id: gcm_input.cpp,v 1.
9 2003-09-01 06:59:26
arjen Exp $";
#include <fstream>
#include <fstream>
@@
-163,11
+167,16
@@
int main(int argc, char *argv[])
case 'd':
arrival = String(optarg);
case 'd':
arrival = String(optarg);
- if (!
arrival
.proper())
+ if (!
date(arrival)
.proper())
{
{
- std::cerr << "gcm_input: Invalid date string: " << optarg << ".\n";
+ std::cerr << "gcm_input: Invalid date string: " << optarg
+ << "(" << arrival << ").\n";
exit(1);
}
exit(1);
}
+ else if (!hour(arrival).proper())
+ {
+ arrival = UTC(date(arrival), hour(0,0,0));
+ }
break;
case 's':
break;
case 's':
@@
-227,8
+236,6
@@
int main(int argc, char *argv[])
}
}
}
}
- *log << "Gcm_input starting at " << Now() << ".\n";
-
if (verbose)
{
*log << "Hostname = " << hostname;
if (verbose)
{
*log << "Hostname = " << hostname;
@@
-259,7
+266,6
@@
int main(int argc, char *argv[])
{
msg.enter();
}
{
msg.enter();
}
- *log << "Gcm_input finished at " << Now() << ".\n";
return 0;
}
else
return 0;
}
else