I was told that an adversary can figure out system uptime by looking at TCP timestamps. But I'm not sure who exactly can see this information. For example, if I set up a hardware Tor gateway so that all network traffic from my computer goes through Tor, and browse SE website normally using the computer, will my ISP know my system's uptime? Will SE website know? What about the local network administrator?
TCP timestamps are only visible at the endpoints of the specific TCP connection and on every hop in between. If you are setting up a "hardware" Tor gateway (i.e. some software running on some gateway system) the TCP connection from your systems ends at this gateway. Who can then view the TCP timestamps depends on where this gateway is located. But if it is located inside your local network your ISP will not be able to see the TCP timestamps from your system. He might be able to see the TCP timestamps from your Tor gateway though.