Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add date/timestamp field #20

Closed
annevk opened this issue Aug 6, 2014 · 7 comments
Closed

Add date/timestamp field #20

annevk opened this issue Aug 6, 2014 · 7 comments

Comments

@annevk
Copy link
Member

annevk commented Aug 6, 2014

See http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Aug/0017.html

@sicking, I guess this should just mimic the timestamp used for Date objects? Do we expect applications to worry about timezones?

@sicking
Copy link

sicking commented Aug 6, 2014

I don't think we need to worry about timestamps. The main usecase here
it to make sure that text like "5 minutes ago" or "in 10 minutes" that
the platform would show next to the notification reflects when the
relevant event happened, rather than when the notification was
created.

If the user crosses a timezone line that doesn't affect how long ago
that the event happened.

/ Jonas

@annevk
Copy link
Member Author

annevk commented Aug 7, 2014

So you think it should be an offset? In milliseconds per what we decided for web animations? Paging @domenic for verification.

@domenic
Copy link
Member

domenic commented Aug 7, 2014

I read @sicking as wanting an absolute point in time. (Timezone-independent.) In that case we would use a timestamp, like that returned by Date.now().

I guess I am assuming "I don't think we need to worry about timestamps" was supposed to be "I don't think we need to worry about timezones."

Anyway, yes, we did indeed fix web animations to use milliseconds for offsets, in the event that I am wrong and @sicking wanted offsets.

@sicking
Copy link

sicking commented Aug 7, 2014

What @domenic said. I ment to say to not worry about timezones. And that we
should use timezone independent points in time. I.e. what's returned from
Date.now().

So if you want to notify about a meeting happening in 10 minutes, you'd
use: Date.now() + 1000_60_10.

@sicking
Copy link

sicking commented Sep 30, 2015

Ping? Any reason not to do this? This seems like a simple feature to add, and notifications look really ugly when you get a notification which says "Meeting starting in 10 minutes [8 minutes ago]" where the part inside the [] is rendered by the platform in a different color.

@annevk
Copy link
Member Author

annevk commented Oct 1, 2015

I guess we should do this, yes. Perhaps @beverloo or @johnmellor wants to create another PR?

@beverloo
Copy link
Member

beverloo commented Oct 1, 2015

I'm in favor of doing this too, and will prepare a PR tomorrow. Thanks for kicking this up, @sicking! :)

beverloo added a commit to beverloo/notifications that referenced this issue Oct 2, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
beverloo added a commit to beverloo/notifications that referenced this issue Oct 2, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
beverloo added a commit to beverloo/notifications that referenced this issue Oct 2, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
beverloo added a commit to beverloo/notifications that referenced this issue Oct 14, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
beverloo added a commit to beverloo/notifications that referenced this issue Oct 14, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
beverloo added a commit to beverloo/notifications that referenced this issue Oct 14, 2015
Fixes whatwg#20.

The `timestamp` of a notification is the time, in milliseconds since
the epoch, of the event for which the notification was created. Web
developers can use this if the time of this event does not match the
time at which the notification is being shown, which can be the case
when notifying the user of upcoming calendar events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants