There's some repetition here, which, in this case, is fine. I would, however, consider formatting it a bit differently, to make it more readable:

```
when_start_raw: when_node ? DateTime.iso8601(when_node.attribute('startTime').text).to_time.to_i : 0,
when_end_raw: when_node   ? DateTime.iso8601(when_node.attribute('endTime').text).to_time.to_i   : 0,
```