/* Ref chapter 6.3. ExpiryTime and chapter 6.3.9.2.2 DeliveryTime  */
static gint32 dmp_dec_exp_del_time(guint8 timev, gboolean expiry_time)
/* Ref chapter 6.3. ExpiryTime and chapter 6.3.9.2.2 DeliveryTime  */
static gint32 dmp_dec_exp_del_time(guint8 timev, gboolean expiry_time)
{
  gint32 time_value = 0;
  if (expiry_time && (timev == 0x00)) {
    time_value = DMP_TIME_NOT_PRESENT;
  } else if (timev <= 0x1D) {
    time_value = timev * 2;
  } else if (timev <= 0x91) {
    time_value = (timev - 0x1D + 3) * 15;
  } else if (timev <= 0xBB) {
    time_value = (timev - 0x91 + 5) * 5*60;
  } else if (timev <= 0xE3) {
    time_value = (timev - 0xBB + 7) * 30*60;
  } else if (timev < 0xFF) {
    time_value = (timev - 0xE3 + 11) * 2*3600;
  } else {
    time_value = DMP_TIME_RESERVED;
  }
  return time_value;
}