$timeStamp
Returns the current Unix timestamp (the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC).
Think of it as: Getting a numerical representation of the current date and time.
Usage: $timeStamp[Return in Seconds (Yes/No)]
Return in Seconds (Yes/No): This is an optional argument.- If set to
Yes, the function will return the timestamp in seconds instead of milliseconds. - If set to
No(or left blank), the function will return the timestamp in milliseconds.
- If set to
Alias: This function is an alias for $dateStamp. You can use either one interchangeably.
Example:
Explanation of the example:
- The first value
1630841854895is the current time in milliseconds. - The second value
1630841854is the current time in seconds because we specifiedyesin the function call.