time () localtime () gmtime () Introduction

time_t time (time_t * t) // get (usually midnight on January 1, 1970) the number of seconds from the standard time point to the current time.

tm * localtime (time_t * t) // returns the time tm structure represented by local time

gettime () // gmtime is the date and time conversion functions to Greenwich Mean (GMT) time. Converting time information time_t structural parameters indicated in the date and time into the real world representation used, then the results returned by tm structure.

Published 25 original articles · won praise 5 · Views 3229

Guess you like

Origin blog.csdn.net/Ellis1993/article/details/78014828