About 42,100 results
Open links in new tab
  1. datetime - How to get UTC time in Python? - Stack Overflow

    Apr 11, 2013 · For Python 3, use datetime.now(timezone.utc) to get a timezone-aware datetime, and use to convert it to a timestamp.

  2. What is the difference between UTC and GMT? - Stack Overflow

    Feb 23, 2018 · Yes, time can be captured in UTC alone. Storing time in UTC and using UTC for transmitting date-time information is generally considered good practice. I suppose it’s up to each …

  3. javascript - How to convert a Date to UTC? - Stack Overflow

    The resulting utc object isn't really a UTC date, but a local date shifted to match the UTC time (see comments). However, in practice it does the job. Update: The above answer from 2012 was a quick …

  4. c - Getting UTC time as time_t - Stack Overflow

    By definition the C time() function returns a time_t epoch time in UTC. So the code commented "//get the local time in time_t" is really getting UTC already, and the comment is incorrect.

  5. Does Python's time.time () return the local or UTC timestamp?

    Dec 15, 2012 · The timestamp returned by time.time() is not in any timezone. "seconds since the epoch" is a term; it is not elapsed seconds since some point in time (epoch). You can convert it to your local …

  6. c# - Where's the DateTime 'Z' format specifier? - Stack Overflow

    A UTC DateTime is being converted to text in a format that is only correct for local times. This can happen when calling DateTime.ToString using the 'z' format specifier, which will include a local time …

  7. Oracle SQL: converting timestamp to UTC - Stack Overflow

    Mar 27, 2014 · It normalizes the input to UTC time (Coordinated Universal Time, formerly Greenwich Mean Time). Unlike SQL function TO_TIMESTAMP_TZ , the new function assumes that the input …

  8. How do I get a UTC Timestamp in JavaScript? - Stack Overflow

    Mar 18, 2012 · Timestamp is always in UTC. new Date().toString() will show you current time zone time representation, new Date().toUTCString() will show you UTC time repr, but new Date().getTime() is …

  9. How to initialize a JavaScript Date to a particular time zone

    I have date time in a particular timezone as a string and I want to convert this to the local time. But, I don't know how to set the timezone in the Date object.

  10. Current UTC time point in C++ - Stack Overflow

    Aug 20, 2020 · I want to send a time point over a network connection to detect the ping time and for other calculations. The time has to have millisecond precision, but using: auto currently = std::chrono::