?
Solved

Local tim to GMT

Posted on 1999-01-29
2
Medium Priority
?
241 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 85

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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

755 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