addhour issue with custom functions

addhour issue with custom functions

Hello,

With a survey date of 25/12/2017

survey_date.toTime() gives:  25/12/2017 12:00:00 as expected

a = survey_date.toTime().addHour(10);

info a; gives 25/12/2017 10:00:00 as expected

b = a.subHour(10);

info a; gives just 25/12/2017 and an error i.e. no time element.

I've also tried:

a = survey_date.toTime().addHour(22); which also gives 25/12/2017 10:00:00, where I would expect 25/12/2017 22:00:00

Any ideas please?

Simon