Search results for 'GM Time'. 1 post(s) found.
- 2009/03/20 How to get GM Time as String ?
Here's the simple example to get GMT string.
#include <time.h>
#include <sys/types.h>
#include <stdio.h>
int main()
{
struct tm *mytm;
time_t current_time = time((time_t*)NULL);
mytm = GMTime(¤t_time);
// convert GMT to string by asctime()
printf("%s", asctime(mytm));
return 0;
}
#include <sys/types.h>
#include <stdio.h>
int main()
{
struct tm *mytm;
time_t current_time = time((time_t*)NULL);
mytm = GMTime(¤t_time);
// convert GMT to string by asctime()
printf("%s", asctime(mytm));
return 0;
}
Another posts included in "C, C++"
| How to load HTML resource on MFC ? (0) | 2009/03/23 |
| URL Encode, Decode function for MFC (0) | 2009/03/24 |
| How to call SetTimer function on MFC CDialog class ? (0) | 2008/07/30 |
| How to search file on certain directory ? (0) | 2008/06/16 |
| How to run shell command by MFC ? (0) | 2007/09/09 |
| Binary Search Sample Code (0) | 2007/09/08 |
| Double Linked List (0) | 2007/09/08 |

Prev

Rss Feed