Does Python's time.time() return a timestamp in UTC? [duplicate]
This question already has an answer here: Does Python's time.time() return the local or UTC timestamp? 7 answers I need to generate a UNIX timestamp in UTC time so I'm using time.time() to produce it. Do I need to do anything else or is the timestamp automatically in UTC? Technically, time.time() doesn't specify, and practically, at least in CPython, it returns a timestamp in whatever format is used by the underlying standard C library's time function. The C standard (which isn't freely available) doesn't say whether this is GMT, and neither does the POSIX standard . It just says: The time()