time(0) is for UTC or local time?

Hi,

I am using time(0) for current timestamp for communication in Debian Jessie platform, but it seems different VMs or embedded systems (all running Debian Jessie) have different result, some for UTC and some for localtime. How can I make time(0) consistent for UTC only?

Thank you.

Kind regards.
Are you sure the system clocks are correct? It should give you the number of seconds since 1970-01-01 00:00:00 (UTC).
closed account (E0p9LyTq)
How can I make time(0) consistent for UTC only?

Take the output from time() and use it as an input to gtime().


http://en.cppreference.com/w/c/chrono/gmtime
Topic archived. No new replies allowed.