Template:ICTimestamp

From Velvet Room MUSH Wiki
Jump to navigation Jump to search

Given an OOC Date, returns a timestamp for a corresponding IC timestamp. Timestamps will be normalized to midnight for Part 1 of a given day, or noon for Part 2 of a given day.


Usage:

{{ICTimestamp[|<date>]}}

Parameters
date (Optional) An OOC Date. The exact format should be relatively flexible. Defaults to the current real-world date if not provided.

Notes:

It is recommended that you use {{ICDate}} or {{ICAge}} instead of this template as they provide an easier interface to the IC time.

This returns a Unix epoch timestamp. To display it on the wiki with {{#time}} it is advisable that you use Local to 1, or that you use {{#timel}} to ensure that the date is displayed relative to the wiki's timezone.


Examples:

{{ICTimestamp}}


1356066000


{{ICTimestamp|Jun 27 2025}}


1338566400