Got it!
The following code snippet would solve this:
time_t now = time(0); // UTC
time_t diff;
struct tm *ptmgm = gmtime(&now); // further convert to GMT presuming now in local
time_t gmnow = mktime(ptmgm);
diff = gmnow - now;
if (ptmgm->tm_isdst > 0) {
diff = diff - 60 * 60;
}
The trick is to check tm_isdst flag, if applicable and if set, adjust one hour more to diff This works. Thanks to all for your time.