views:

21

answers:

2

In my project i am using GetLocalTime() and GetSystemTime and set the current time into registry. But my problem is when i am changing the time of my machine the changed time only saving to registry. Is there any chance to access the GMT time so that its independent of machine and nobody can change the time..

Please give some help

+2  A: 

couldn't understand very well your question.

Ellome
A: 

How to access GMT time using VC

// you mentioned it
#include <Windows.h>
SYSTEMTIME gmtTime;
ZeroMemory(&gmtTime,sizeof(gmtTime));
GetSystemTime(&gmtTime);

This function is using your machine's hardware time. If you want a time that's independent of your machine, then you may want to use NTP or SNTP

afriza