Retrieve timestamp from TOTP value
In theory, it is not:

TOTP, like HOTP, is based on a Hash-based message authentication code (HMAC),
which in turn relies on a cryptographic hash.

Both the key, and the HMAC message (a time counter in TOTP) are hashed using the specified cryptographic hash.

One key goal of cryptographic hashes is:


it should be infeasible to generate a message that has a given hash


By definition, TOTP uses the SHA-1 hash function, which can be considered reasonably secure in this context.
Thus, it is impossible to determine either the key, or the time counter from just the hash value, even less so from the TOTP result, which is only a truncated part of the hash value.

In practice, maybe:

If you know the key you can itterate through a set of likely time counter values (e.g. now +/- one minute; now +/- x hours for timezone issues) and find the correct time counter value.

In fact, this is a variation of a brute force attack, with a limited set of likely inputs.