std::mktime and timezone info

后端 未结 12 513
忘了有多久
忘了有多久 2020-11-30 10:56

I\'m trying to convert a time info I reveive as a UTC string to a timestamp using std::mktime in C++. My problem is that in / &

12条回答
  •  春和景丽
    2020-11-30 11:23

    The tm structure used by mktime has a timezone field.
    What happens if you put 'UTC' into the timzone field?

    http://www.delorie.com/gnu/docs/glibc/libc_435.html

提交回复
热议问题