[wp-meta] [Making WordPress.org] #4480: Event API returns date/time information without timezone
Making WordPress.org
noreply at wordpress.org
Tue Aug 25 04:59:04 UTC 2020
#4480: Event API returns date/time information without timezone
-------------------------+-----------------------
Reporter: Rarst | Owner: iandunn
Type: enhancement | Status: accepted
Priority: high | Milestone:
Component: Events API | Resolution:
Keywords: |
-------------------------+-----------------------
Comment (by Rarst):
Not sure about names for the new fields, if they will hold timestamps they
might be better named as such? Seems confusing that `date` field is a
string, but `date_utc` is a timestamp. `timestamp` and `timestamp_end`
maybe?
`strotime()` for reversing timestamps is flawed and we are removing it in
core. Is there now better time zone information than seconds offset to
use?
For more robust example [https://github.com/WordPress/wordpress-
develop/blob/c20372e0aa6d82fb4fdd65ed921d843b7fff6177/src/wp-
includes/functions.php#L184-L191 see `date_i18n()`] (except time zone
would be event, not site in this case).
Also I still would like to see API response contain event time zone
somewhere, if it's now available? That's just meaningful to have, even if
core won't use it right now.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/4480#comment:15>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list