Fb:time

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Renders the date and time in the user's time zone. In order to show dates in a more flexible format, use Fb:date.

Attributes

RequiredNameTypeDescription
required t int The time to display in epoch seconds.
optional tz string The time zone in which to display t. Acceptable formats include PHP's List of Supported Timezones and +/- formats such as Etc/GMT-7. Note: Due to a bug (see below) when using a timezone in the Etc/GMT format the time is relative to the timezone. (Default value is loggedinuser's timezone.)
preposition bool Indicates whether to automatically insert prepositions as appropriate into the time, where "at" prepends the time and "on" prepends the date if it appears. (Default value is false.)

Examples

<fb:time t='1191648451'/>
time1.jpg


<fb:time t="1180502413" tz="America/New_York" />
time2.jpg

Notes

  • The time expands as needed. If t took place in the same day, only hour:minutes[am|pm] appears. For more flexible date formats, please see Fb:date.
  • When timezone is entered in the Etc/GMT format the time is the opposite of what is expected. See [1]. The takeaway is that GMT-5 (EST) should be passed to tz as Etc/GMT+5 because of the odd convention.

See Also

You can see a real world example of this tag in the Footprints demo application. Go to Demos for more details and to download and install the demo apps.