]> git.stg.codes - stg.git/blobdiff - projects/stargazer/tariff_impl.cpp
Ticket 37. The time_t currentTime parameter added in
[stg.git] / projects / stargazer / tariff_impl.cpp
index a3084fbcd810c781fdd895be95c6148b797400f1..c8a0161c6deddb67f67677e3945a2b25ed7cb306 100644 (file)
@@ -147,6 +147,9 @@ else
 //-----------------------------------------------------------------------------
 std::string TARIFF_IMPL::TariffChangeIsAllowed(const TARIFF & to) const
 {
+time_t timeout = GetChangePolicyTimeout();
+if (stgTime > timeout && timeout != 0)
+    return "";
 switch (GetChangePolicy())
     {
     case TARIFF::ALLOW: