Fb:time

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] Description

Renders the date and time in the user's time zone.


[edit] 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)


[edit] Examples

<fb:time t='1191648451'/>
time-screenshot.png


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


[edit] Notes

  • The time expands as needed. If t took place in the same day, only hour:minutes[am|pm] appears. If t is in the same year, Month Day hour:minutes[am|pm] appears. Otherwise, Month Day, Year hour:minutes[am|pm] appears.
  • When timezone is entered in the Etc/GMT format the time is interpreted as relative to that timezone. This bug has been reported (and may be a smaller subset of this bug). The same behaviour does not occur when the timezone is in the preferred Continent/City format.


[edit] 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.