Here is an excerpt from a review of The Merchant and the Alchemist’s Gate by William Mingin at Strange Horizons.
“Fuwaad ibn Abbas, a fabric merchant, tells this story to the Caliph of Baghdad, perhaps in the classic “Arabian Nights” period of the Caliphate, as “a warning to those who would be warned and a lesson to those who would learn.”
On entering a metalsmith’s shop, he finds many intricate devices and “ingenious mechanisms.” The experiments in alchemy of Bashaarat, the owner, possibly include electromagnetism, but most remarkable is his ability to find and expand tiny “wormholes” in reality, fixing them in metal hoops. One side of these openings precedes the other by a set interval of time. The largest is a Gate of Years, spanning two decades. Bashaarat had for many years such a gate in Cairo; each who used the gate learned something different, as Bashaarat, in stories within the main story, relates.”
See also Ted Chiang’s The Merchant and the Alchemist’s Gate