Destiny 2 has a new exotic quest "Moment of Time", for completing which you will receive the Devil's Ruins pistol.
Step 1: Start the "Moment in Time" quest
Travel to Mercury and complete the Sundial arena (available on Normal difficulty). Then interact with the Sundial for a new quest and a timeless case.
Step 2: The Lost Relic
Go to the Tower hangar and talk to Saint-14. After examining the body you found, he will say that he can help in the creation of weapons.
Step 3: A Journey Through History
He will send you to the Twilight Rift. You can get there by going to the European Dead Zone (EMZ) and taking the Lost Parts quest to the left of Winding Cove.
You will need to collect 10 Timeless Fragments that are scattered throughout the map. They're pretty easy to find:
Once you find all the fragments, the weapon will automatically appear in your inventory.