In this section, you will study how to get the gmt time in C. GMT stands for Greenwich Mean Time. In the given example, the time() function determines the current time in seconds and assign it to t. We have used the library function gmtime() to adjust a time_t representation to a Universal Time string, and then converts it to a printable string using the asctime() function.
Here is the code:
Output will be displayed as:
Posted on: February 5, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles