diff --git a/airtime_mvc/application/models/airtime/CcBlockcontents.php b/airtime_mvc/application/models/airtime/CcBlockcontents.php index 7c307610a..caae46f6a 100644 --- a/airtime_mvc/application/models/airtime/CcBlockcontents.php +++ b/airtime_mvc/application/models/airtime/CcBlockcontents.php @@ -63,7 +63,11 @@ class CcBlockcontents extends BaseCcBlockcontents { } } - $this->fadein = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadein = $dt->format('H:i:s.u'); + } else { + $this->fadein = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN; return $this; @@ -95,8 +99,12 @@ class CcBlockcontents extends BaseCcBlockcontents { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } - - $this->fadeout = $dt->format('H:i:s').".".$microsecond; + + if ($microsecond == 0) { + $this->fadeout = $dt->format('H:i:s.u'); + } else { + $this->fadeout = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT; return $this; diff --git a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php index 1b0abe796..ab0aa6d56 100644 --- a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php +++ b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php @@ -62,7 +62,11 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadein = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadein = $dt->format('H:i:s.u'); + } else { + $this->fadein = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN; return $this; @@ -95,7 +99,11 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadeout = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadeout = $dt->format('H:i:s.u'); + } else { + $this->fadeout = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT; return $this; diff --git a/airtime_mvc/application/models/airtime/CcSchedule.php b/airtime_mvc/application/models/airtime/CcSchedule.php index 4230c54b8..e051df6c3 100644 --- a/airtime_mvc/application/models/airtime/CcSchedule.php +++ b/airtime_mvc/application/models/airtime/CcSchedule.php @@ -125,7 +125,12 @@ class CcSchedule extends BaseCcSchedule { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } - $this->fade_in = $dt->format('H:i:s').".".$microsecond; + + if ($microsecond == 0) { + $this->fadein = $dt->format('H:i:s.u'); + } else { + $this->fadein = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcSchedulePeer::FADE_IN; return $this; @@ -158,7 +163,11 @@ class CcSchedule extends BaseCcSchedule { } } - $this->fade_in = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadeout = $dt->format('H:i:s.u'); + } else { + $this->fadeout = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcSchedulePeer::FADE_OUT; return $this; diff --git a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php index 1b0abe796..ab0aa6d56 100644 --- a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php +++ b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php @@ -62,7 +62,11 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadein = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadein = $dt->format('H:i:s.u'); + } else { + $this->fadein = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN; return $this; @@ -95,7 +99,11 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadeout = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadeout = $dt->format('H:i:s.u'); + } else { + $this->fadeout = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT; return $this; diff --git a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php index 6108e48af..b411d410e 100644 --- a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php +++ b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php @@ -125,7 +125,11 @@ class CcSchedule extends BaseCcSchedule { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } - $this->fade_in = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadein = $dt->format('H:i:s.u'); + } else { + $this->fadein = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcSchedulePeer::FADE_IN; return $this; @@ -158,7 +162,11 @@ class CcSchedule extends BaseCcSchedule { } } - $this->fade_out = $dt->format('H:i:s').".".$microsecond; + if ($microsecond == 0) { + $this->fadeout = $dt->format('H:i:s.u'); + } else { + $this->fadeout = $dt->format('H:i:s').".".$microsecond; + } $this->modifiedColumns[] = CcSchedulePeer::FADE_OUT; return $this;