diff --git a/Common/onelab.h b/Common/onelab.h
index 678b887aab5f4fd339280d853d0099f3fd23e74b..96745829030ab69f42d1a6f83b0defa5c4a9fa3b 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -770,7 +770,7 @@ namespace onelab{
       time_t now;
       time(&now);
       std::string t(ctime(&now));
-      t.pop_back();
+      t.resize(t.size() - 1);
       json.clear();
       json += "{ \"onelab\":{\n";
       json += "  \"creator\":\"" + creator + "\",\n";