src/PelEntryTime.php
public function getValue($type = self::UNIX_TIMESTAMP)
    {
        switch ($type) {
            case self::UNIX_TIMESTAMP:
                $seconds = $this->convertJdToUnix($this->day_count);
                if ($seconds === false) {
                    /*
                     * We get false if the Julian Day Count is outside the range
                     * of a UNIX timestamp.
                     */
                    return false;
                } else {
                    return $seconds + $this->seconds;
                }
                break;
            case self::EXIF_STRING:
                list ($year, $month, $day) = $this->convertJdToGregorian($this->day_count);
                $hours = (int) ($this->seconds / 3600);
                $minutes = (int) ($this->seconds % 3600 / 60);
                $seconds = $this->seconds % 60;
                return sprintf('%04d:%02d:%02d %02d:%02d:%02d', $year, $month, $day, $hours, $minutes, $seconds);
            case self::JULIAN_DAY_COUNT:
                return $this->day_count + $this->seconds / 86400;
            default:
                throw new PelInvalidArgumentException(
                    'Expected UNIX_TIMESTAMP (%d), ' . 'EXIF_STRING (%d), or ' . 'JULIAN_DAY_COUNT (%d) for $type, got %d.',
                    self::UNIX_TIMESTAMP,
                    self::EXIF_STRING,
                    self::JULIAN_DAY_COUNT,
                    $type
                );
        }
    }
public function getValue($type = self::UNIX_TIMESTAMP)
    {
        switch ($type) {
            case self::UNIX_TIMESTAMP:
                $seconds = $this->convertJdToUnix($this->day_count);
                if ($seconds === false) {
                    /*
                     * We get false if the Julian Day Count is outside the range
                     * of a UNIX timestamp.
                     */
                    return false;
                } else {
                    return $seconds + $this->seconds;
                }
                break;
            case self::EXIF_STRING:
                list ($year, $month, $day) = $this->convertJdToGregorian($this->day_count);
                $hours = (int) ($this->seconds / 3600);
                $minutes = (int) ($this->seconds % 3600 / 60);
                $seconds = $this->seconds % 60;
                return sprintf('%04d:%02d:%02d %02d:%02d:%02d', $year, $month, $day, $hours, $minutes, $seconds);
            case self::JULIAN_DAY_COUNT:
                return $this->day_count + $this->seconds / 86400;
            default:
                throw new PelInvalidArgumentException(
                    'Expected UNIX_TIMESTAMP (%d), ' . 'EXIF_STRING (%d), or ' . 'JULIAN_DAY_COUNT (%d) for $type, got %d.',
                    self::UNIX_TIMESTAMP,
                    self::EXIF_STRING,
                    self::JULIAN_DAY_COUNT,
                    $type
                );
        }
    }
public function getValue ( $ type = self :: UNIX_TIMESTAMP ) { switch ( $ type ) { case self :: UNIX_TIMESTAMP : $ seconds = $ this -> convertJdToUnix ( $ this -> day_count ) ; if ( $ seconds === false ) { /*
                     * We get false if the Julian Day Count is outside the range
                     * of a UNIX timestamp.
                     */ return false ; } else { return $ seconds + $ this -> seconds ; } break ; case self :: EXIF_STRING : list ( $ year , $ month , $ day ) = $ this -> convertJdToGregorian ( $ this -> day_count ) ; $ hours = ( int ) ( $ this -> seconds / 3600 ) ; $ minutes = ( int ) ( $ this -> seconds % 3600 / 60 ) ; $ seconds = $ this -> seconds % 60 ; return sprintf ( '%04d:%02d:%02d %02d:%02d:%02d' , $ year , $ month , $ day , $ hours , $ minutes , $ seconds ) ; case self :: JULIAN_DAY_COUNT : return $ this -> day_count + $ this -> seconds / 86400 ; default : throw new PelInvalidArgumentException ( 'Expected UNIX_TIMESTAMP (%d), ' . 'EXIF_STRING (%d), or ' . 'JULIAN_DAY_COUNT (%d) for $type, got %d.' , self :: UNIX_TIMESTAMP , self :: EXIF_STRING , self :: JULIAN_DAY_COUNT , $ type ) ; } }
Return the timestamp of the entry.

The timestamp held by this entry is returned in one of three
formats: as a standard UNIX timestamp (default), as a fractional
Julian Day Count, or as a string.

@param integer $type
the type of the timestamp. This must be one of
{@link UNIX_TIMESTAMP}, {@link EXIF_STRING}, or
{@link JULIAN_DAY_COUNT}.

@return integer the timestamp held by this entry in the correct form
as indicated by the type argument. For {@link UNIX_TIMESTAMP}
this is an integer counting the number of seconds since January
1st 1970, for {@link EXIF_STRING} this is a string of the form
'YYYY:MM:DD hh:mm:ss', and for {@link JULIAN_DAY_COUNT} this is a
floating point number where the integer part denotes the day
count and the fractional part denotes the time of day (0.25 means
6:00, 0.75 means 18:00).
Return the timestamp of the entry .