Converts a time represented as an integer to a Date instance.

@param time integer time
@return Date instance
182776
private Date getTimeFromInteger(Integer time)
   {
      Date result = null;

      if (time != null)
      {
         int minutes = time.intValue();
         int hours = minutes / 60;
         minutes -= (hours * 60);

         Calendar cal = DateHelper.popCalendar();
         cal.set(Calendar.MILLISECOND, 0);
         cal.set(Calendar.SECOND, 0);
         cal.set(Calendar.MINUTE, minutes);
         cal.set(Calendar.HOUR_OF_DAY, hours);
         result = cal.getTime();
         DateHelper.pushCalendar(cal);
      }

      return (result);
   }
1369012
@Deprecated
	public static String getDateStringSecond(String time) {
		return
			time.substring(6,8)
			+MONTHS[Integer.parseInt(time.substring(4,6))]
			+time.substring(0,4)
			+' '
			+time.substring(8,10)
			+':'
			+time.substring(10,12)
			+':'
			+time.substring(12,14)
		;        
	}
1084165
def to_time(time, granularity):
    """"""
    if not granularity:
        if type(time) is datetime.date:
            return format_date(time)
        else:
            return format_time(time)
    if granularity == GRANULARITY.HOUR:
        return format_time(remove_minutes(time))
    elif granularity == GRANULARITY.DAY:
        return format_date(remove_hours(time))
    else:
        return format_time(time)
419943
public static function getDate($time = null, $fmt = 'Y-m-d')
    {
        $times = $time?$time:time();
        return date($fmt, $times);
    }
805673
public static double currentTime()
    {
        java.util.Date time = new java.util.Date();
        m_calendar.setTime(time);
//x        m_calendar.set(Calendar.SECOND, 0);
        m_calendar.set(Calendar.MILLISECOND, 0);
        time = m_calendar.getTime();
        return time.getTime(); // Convert to double
    }
116172
def to_datetime(time):
    ''''''
    if type(time) == IntType or type(time) == LongType:
        time = datetime.fromtimestamp(time // 1000)
    return time
1131214
@Deprecated
	public static String getDateStringSecond(long time) {
		Date date=new Date(time);
		Calendar C=Calendar.getInstance();
		C.setTime(date);
		int day=C.get(Calendar.DATE);
		int hour=C.get(Calendar.HOUR_OF_DAY);
		int minute=C.get(Calendar.MINUTE);
		int second=C.get(Calendar.SECOND);
		return
			(day>=0 && day<=9 ? "0":"")
			+day
			+MONTHS[C.get(Calendar.MONTH)]
			+C.get(Calendar.YEAR)
			+' '
			+(hour>=0 && hour<=9 ? "0":"")
			+hour
			+':'
			+(minute>=0 && minute<=9 ? "0":"")
			+minute
			+':'		
			+(second>=0 && second<=9 ? "0":"")
			+second
		;
	}
587747
public static String getShowTimeStr(Integer time) {
        if (time == null) {
            return MINUTE_WINDOW_STR;
        } else if (time.equals(MINUTE_WINDOW)) {
            return MINUTE_WINDOW_STR;
        } else if (time.equals(HOUR_WINDOW)) {
            return HOUR_WINDOW_STR;
        } else if (time.equals(DAY_WINDOW)) {
            return DAY_WINDOW_STR;
        } else if (time.equals(ALL_TIME_WINDOW)) {
            return ALL_WINDOW_STR;
        } else {
            return MINUTE_WINDOW_STR;
        }

    }
1222124
private static long javaToDosTime(long time) {
        Date d = new Date(time);
        int year = d.getYear() + 1900;
        if (year < 1980) {
            return (1 << 21) | (1 << 16);
        }
        return (year - 1980) << 25 | (d.getMonth() + 1) << 21 |
               d.getDate() << 16 | d.getHours() << 11 | d.getMinutes() << 5 |
               d.getSeconds() >> 1;
    }
472989
public static String getTimestamp(Date time) {
        return getTimestampFormatter().format(time == null ? new Date() : time);
    }
959258
def time_to_number(self, time):
        
        if not isinstance(time, datetime.time):
            raise TypeError(time)
        return ((time.second / 60.0 + time.minute) / 60.0 + time.hour) / 24.0
1264964
protected function setTime($time) {

        if ($time === null) {
            $time = 0;
        }

        $this->time = new \DateTime('@' . $time);
        return $this;

    }
775550
public JKTimeObject toTimeObject(Date date, Date time) {
		JKTimeObject fsTimeObject = new JKTimeObject();
		Calendar timeInstance = Calendar.getInstance();
		timeInstance.setTimeInMillis(time.getTime());
		fsTimeObject.setHour(timeInstance.get(Calendar.HOUR_OF_DAY));
		fsTimeObject.setMunite(timeInstance.get(Calendar.MINUTE));

		Calendar dateInstance = Calendar.getInstance();
		dateInstance.setTime(date);
		fsTimeObject.setYear(dateInstance.get(Calendar.YEAR));
		fsTimeObject.setMonth(dateInstance.get(Calendar.MONTH));
		fsTimeObject.setDay(dateInstance.get(Calendar.DAY_OF_MONTH));
		return fsTimeObject;
	}
313948
public Date getTime(Integer type)
   {
      Date result = null;

      byte[] item = m_map.get(type);
      if (item != null)
      {
         result = MPPUtility.getTime(item, 0);
      }

      return (result);
   }
52940
public function time($time)
    {
        if ($time instanceof Carbon) {
            $time = $time->timestamp;
        }

        $this->timestamp = $time;

        return $this;
    }
1179744
public static long getMs(String time) {
    try {
      return FormatUtils.parseTimeSize(time);
    } catch (Exception e) {
      throw new RuntimeException(ExceptionMessage.INVALID_TIME.getMessage(time));
    }
  }
536100
public static int getHour(Date timeFrom) {
		Calendar instance = Calendar.getInstance();
		instance.setTime(timeFrom);
		int hour = instance.get(Calendar.HOUR);
		return hour;

	}