summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools.cpp')
-rw-r--r--tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools.cpp b/tools.cpp
index a75068f..8dca6df 100644
--- a/tools.cpp
+++ b/tools.cpp
@@ -150,6 +150,8 @@ std::string MD5Hash(std::string const& str)
time_t GetTimeT(std::string timestring) // timestring in HH:MM
{
timestring = StringReplace(timestring, ":", "");
+ if (timestring.size() < 4)
+ timestring += string(4 - timestring.size(), '0');
int iTime = lexical_cast< int >( timestring );
struct tm tm_r;
time_t t = time(NULL);