[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.
`You should normally not need` → `Normally you should not need`