It’s possible the value 1788987018779 is still being interpreted as a string despite looking like an integer.
If you run now.to_i.to_time it returns:
2026-09-10T15:01:13.000000-07:00
So it’s possible you simply need to add .to_i to your formula to re-type it before .to_time
Images attached. Hope this helps!