Solved

Local tim to GMT

Posted on 1999-01-29
2
215 Views
Last Modified: 2010-04-15
Hi,
I would like to know what is the formula to convert local time to GMT with daylight saving.
thanks in advance
0
Comment
Question by:pchaloux
2 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 1258535
#include <time.h>
struct tm local[1]={
0,
20,
15,
29,
1-1,
1999-1900,
5,
28,
-1
};
time_t clock;
clock = mktime(local);
printf("%s\n",asctime(gmtime(&clock)));
0
 
LVL 2

Accepted Solution

by:
amitc011599 earned 100 total points
ID: 1258536
Depends on the format the straight way is to use the standard CRT method, localtime() from time.h.

Incase you need the formula, get the VC++ 5.0 CD, look in the file LOCALTIM.C.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now