[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I parse an UTC date?



On Jun 08, Nicol?s Lichtmaier wrote:
> How do I convert a struct tm to a time_t? There's mktime(3), but it only
> deals with local times. I would need the inverse function of gmtime(3).

glibc has a "timegm" function.  However, that won't be portable beyond
GNU libc.


Chris
-- 
=============================================================================
|        Chris Lawrence         |          It's 2/3 of a beltway...         |
|   <quango@watervalley.net>    |      http://www.lordsutch.com/tn385/      |
|                               |                                           |
|     Open Directory Editor     |    Are you tired of politics as usual?    |
|       http://dmoz.org/        |             http://www.lp.org/            |
=============================================================================



Reply to: