Class PelEntryTime

Description

Class for holding a UNIX timestamp.

This class can hold a single UNIX timestamp, and it will be used as in this example where the time is advanced by one week:

  1. $entry = $ifd->getEntry(PelTag::DATE_TIME_ORIGINAL);
  2. $time = $entry->getValue();
  3. print('The image was taken on the ' . date($time, 'jS'));
  4. $entry->setValue($time + 7 * 24 * 3600);

Located in /PelEntryAscii.php (line 163)

PelEntry
   |
   --PelEntryAscii
      |
      --PelEntryTime
Method Summary
 PelEntryTime __construct (int $tag, [int $timestamp = false])
 int getValue ()
 void setValue (int $timestamp)
Variables
Methods
Constructor __construct (line 184)

Make a new entry for holding a timestamp.

PelEntryTime __construct (int $tag, [int $timestamp = false])

Redefinition of:
PelEntryAscii::__construct()
Make a new PelEntry that can hold an ASCII string.
getValue (line 201)

Return the UNIX timestamp of the entry.

  • return: the timestamp held. This will be a standard UNIX timestamp (counting the number of seconds since 00:00:00 January 1st, 1970 UTC). This will be the same as the one given to setTime or to the constructor.
int getValue ()

Redefinition of:
PelEntryAscii::getValue()
Return the ASCII string of the entry.
setValue (line 218)

Update the UNIX timestamp held by this entry.

  • todo: How to deal with timezones? Use the TimeZoneOffset tag 0x882A?
void setValue (int $timestamp)
  • int $timestamp: the new timestamp to be held by this entry. This should be a standard UNIX timestamp (counting the number of seconds since 00:00:00 January 1st, 1970 UTC). The old timestamp will be overwritten, retrieve it first with getValue if necessary.

Redefinition of:
PelEntryAscii::setValue()
Give the entry a new ASCII value.

Inherited Methods

Inherited From PelEntryAscii

 PelEntryAscii::__construct()
 PelEntryAscii::getText()
 PelEntryAscii::getValue()
 PelEntryAscii::setValue()

Inherited From PelEntry

 PelEntry::getBytes()
 PelEntry::getComponents()
 PelEntry::getFormat()
 PelEntry::getTag()
 PelEntry::getText()
 PelEntry::newFromData()
 PelEntry::__toString()

SourceForge.net Logo Documentation generated on Wed, 21 Jul 2004 19:13:00 +0200 by phpDocumentor 1.3.0RC3