You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
The date field of GET /comments should contain either a 'Z' time offset signature. #1675
Hi @danielbachhuber ,
Thanks for bringing it further. As long as there is no timezone information saved in the first place, I think it is still the right call to not including such an information. Exposing date_gmt value fits my purpose very well, as a plus it also disambiguates the purpose of date.
Forgot to note, this is actually a recent change; previous specs have treated timezone-less strings as UTC time. Weird that the spec has broken backwards compatibility here.
Activity
danielbachhuber commentedon Oct 25, 2015
Thanks for the detailed report.
Dates are returned as ISO8601/RFC3339:
WP-API/lib/endpoints/class-wp-rest-comments-controller.php
Lines 473 to 474 in 8f55847
The timezone is omitted because:
This decision was made in 6d0ad76. I'll flag this for discussion so we can reverify the decision.
You can use the
date_gmtvalue instead, but we'll need to expose it in the view context first. #1690southp commentedon Nov 3, 2015
Hi @danielbachhuber ,
Thanks for bringing it further. As long as there is no timezone information saved in the first place, I think it is still the right call to not including such an information. Exposing
date_gmtvalue fits my purpose very well, as a plus it also disambiguates the purpose ofdate.Lastly, the document states the
dateas:I think it might be clearer if we put it as something like:
danielbachhuber commentedon Nov 3, 2015
Sounds good — submitted in #1715
southp commentedon Nov 4, 2015
Thanks for the help. It looks even better 👍
rmccue commentedon Nov 9, 2015
Forgot to note, this is actually a recent change; previous specs have treated timezone-less strings as UTC time. Weird that the spec has broken backwards compatibility here.