UTC 时间转换为 time_t

        time_t time_gm( struct tm * tm )
        {
#ifdef __FreeBSD__
            return timegm( tm );
#elif (defined(__ANDROID__)) && (!defined(__SONY_ANDROID_TV__))
            return ( time_t )( timegm64( tm ) );
#else
            return ( mktime( tm ) - ( time_t )timezone );
#endif
        }

你可能感兴趣的:(android,timezone,struct,FreeBSD)