I apologize I read the original question in haste, and projected a problem I had on to it.
I had to go from epoch in nano seconds to human readable. With that being said for turning
epoch time to human readable time(epoch2period) it is not so much about the resolution of
the platform of the user but the resolution of the time stamp of the data. Below is an
example of the same time but with different resolutions. The function would handle the
resolution by truncating the epoch as below.
Epoch Time Human Readable Time
1627855200156287917 GMT: Sunday, August 1, 2021 10:00:00.156?????? PM nano
1627855200156287 GMT: Sunday, August 1, 2021 10:00:00.156??? PM micro
1627855200156 GMT: Sunday, August 1, 2021 10:00:00.156 PM milli
1627855200 GMT: Sunday, August 1, 2021 10:00:00 PM
Dealing with time gets extremely difficult. I have spent more time dealing with time then
any other single problem. The more ways GRETL can handle time the better, but yes it is
probably best left for the user for now.