[WIP] first draft of a fix for #5448

first draft of a fix for #5448. Only method stubs so far.

- [ ] create test cases
- [ ] implement DateTime class to provide needed information.
Still not implemented?