I create an entity wrapper from a loaded node object like this: $node_wrapper = entity_metadata_wrapper($node).
Now to work with dates I'd expect to have date field values also wrapped to get DateObjects but this is not the case, instead we have arrays like this:

value = "2016-05-10 09:00:00"
value2 = "2016-05-10 10:00:00"
timezone = "Europe/Moscow"
timezone_db = "UTC"
date_type = "datetime"

which looks a bit confusing having two different timezones in the same array. So the question is: how to create DateObject or how to create a wrapper for DateObject and do this properly?

Comments

OnkelTem created an issue. See original summary.

steinmb’s picture

Title: Basics of Date API » Basics use of Date API
Assigned: OnkelTem » Unassigned