in javascript, we can write something likenew Date().toTimeString();
and it will display "17:08:21 GMT+0800 (CST)"
is there any component/ way that we can use to get similar result related to above ?
@leonalicious Do you need the data for display on the client-side or to send to the server?
If client-side, amp-bind currently does not support date. Please subscribe to the FR https://github.com/ampproject/amphtml/issues/11901.
If need this data to send to server, you can get TIMEZONE and TIMESTAMP via variable substitution ( https://github.com/ampproject/amphtml/blob/master/spec/amp-var-substitutions.md#device-and-browser ).
Hope this helps.
Closing the issue since dup of #11901 and server-side workaround documented above.
Most helpful comment
@leonalicious Do you need the data for display on the client-side or to send to the server?
If client-side,
amp-bindcurrently does not supportdate. Please subscribe to the FR https://github.com/ampproject/amphtml/issues/11901.If need this data to send to server, you can get
TIMEZONEandTIMESTAMPvia variable substitution ( https://github.com/ampproject/amphtml/blob/master/spec/amp-var-substitutions.md#device-and-browser ).Hope this helps.