TS2Int() method changed to readTime() function in the RestoreTariff() function.
'#include "stg/common.h"' added.
#include "postgresql_store.h"
#include "stg/locker.h"
#include "postgresql_store.h"
#include "stg/locker.h"
if (version > 7)
query << ", change_policy = '" << TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) << "', \
if (version > 7)
query << ", change_policy = '" << TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) << "', \
- change_policy_timeout = CAST('" << Int2TS(td.tariffConf.changePolicyTimeout) << "' AS TIMESTAMP)";
+ change_policy_timeout = CAST('" << formatTime(td.tariffConf.changePolicyTimeout) << "' AS TIMESTAMP)";
query << " WHERE pk_tariff = " << id;
query << " WHERE pk_tariff = " << id;
if (version > 7)
{
td->tariffConf.changePolicy = TARIFF::StringToChangePolicy(PQgetvalue(result, 0, 6));
if (version > 7)
{
td->tariffConf.changePolicy = TARIFF::StringToChangePolicy(PQgetvalue(result, 0, 6));
- td->tariffConf.changePolicyTimeout = TS2Int(PQgetvalue(result, 0, 7));
+ td->tariffConf.changePolicyTimeout = readTime(PQgetvalue(result, 0, 7));