Go online to the HPE Manuals website (
https://www.hpe.com/info/nonstop-docs), and choose the proper (NonStop L-Series or NonStop J-Series, for example).
Search for and download 2 manuals, 'Guardian Programmer's Guide' and 'Guardian Procedure Calls Reference Manual'.
Find the chapter in the Programmer's Guide called 'Managing Time', it will discuss a lot of these concepts.
Note that if your system is located in a zone that observes Daylight Savings, or Summer, time, historical timestamps may have some anamolies.
The JULIANTIMESTAMP you retrieved represents a GMT time, not a Local time. So as you determine the JTS for a time in the past,
keep in mind you will have to do some conversions.
The section of that chapter you need is 'Converting Between a Julian Timestamp and a Gregorian Date and Time'.
In particular, the example of COMPUTETIMESTAMP and CONVERTTIMESTAMP.
If you need to deal with the time in other time zones, it gets a lot more complex. I've used the C Runtime library's time functions to help that,but you will
find there's a lot of trial and error involved. Temporal mechanics, even on just our one world, is NOT for the faint of heart.
Good luck,
Bill