This looks to be a bug in the latest release of Debian 4.0 - I have written a C program which starts by ensuring the directories it uses exists and then it writes to those directories and some log files using printf or fprintf - stdout and stderr point to the necessary file and this works fine.
However, I have noticed an odditity on the Banana Pi M1+ (compared to the same program running on the Raspberry Pi).
date shows the correct time and date on the system.
When a folder or file is created, the file date matches the system date and time.
HOWEVER, as soon as any data is written to the file, the file date changes to 2010-01-01 00:00
The folders are similar - when created, they have the system date and time. HOWEVER, as soon as I create a file within the folder, the folder date changes to 2010-01-01 00:00