Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Slack Attachment ts field time irrelevancy #80

Open
houssem-yahiaoui opened this issue Oct 19, 2017 · 1 comment
Open

Slack Attachment ts field time irrelevancy #80

houssem-yahiaoui opened this issue Oct 19, 2017 · 1 comment

Comments

@houssem-yahiaoui
Copy link

Hello,

While sending some incoming_webhooks, i'm using attachments as a message template filling it with data, the ts field is filled with a simple Date.now() with simply returns the current Date/Time timestamp and that value is always irrelevant, i'm wondering.

For reproduction :
Link : https://api.slack.com/docs/messages/builder
Section : attachments.
ts value : simply open your nodejs repl and add the Date.now() value.

Is that suppose to happen, what shall i feed that field so i can get the right date.

Thank you.

@wlblanchette
Copy link

wlblanchette commented Nov 2, 2017

Have to convert from milliseconds to seconds. Just noticed this too.
Date.now() / 1000

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants