amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

FR: Displaying Local Time - possible addition to time ago.

Open QES opened this issue 9 years ago • 1 comments

What's the issue?

When displaying a time you see the time you display, however users in different time zones see your local time and not a time local for them.

So if I have a time displayed on my site of:

3pm Saturday 11th November 2017 (UTC)

Someone in Europe still sees that time but I'd like to show them

4pm (CET)

or in New York

10am (EST)

etc

This could be an addition to TIMEAGO or a new feature entirely.

I can see that the users TIMEZONE is available as an AMP variable but using it as a command line extension means that caching becomes more complex (one version for each timezone viewed) it would be possible to solve this by hacking it but it would be more satisfying to solve this correctly.

My request if for a tool that takes a time and displays it offset to the users LOCAL TIMEZONE in a specified format.

QES avatar Nov 13 '17 18:11 QES

Closing as duplicate of https://github.com/ampproject/amphtml/issues/10837

@QES for now until this feature is in you may want to use the workaround specified in https://github.com/ampproject/amp-by-example/issues/719

aghassemi avatar Nov 14 '17 18:11 aghassemi