sean
sean

Reputation: 57

Slack: Can <!date^...> send current date/time?

In Slack, when using date formatting, such as <!date^1392734382^{date_num}|fallback text>, is it possible to send the current date/time instead of providing a specific Unix time?

Upvotes: 2

Views: 3300

Answers (1)

Erik Kalkoken
Erik Kalkoken

Reputation: 32737

No. This function is just for formatting. So you need to provide timestamp.

But most programming languages have a standard function that returns the current UTC time as UNIX epoch, which you can use.

For example in Python you would do:

from time import time

timestamp = int(time())

Upvotes: 1

Related Questions