Solved

Local tim to GMT

Posted on 1999-01-29
2
213 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
stack 22 159
How to create project in Eclipse ? 1 193
Why does module make constant click noise ? 9 125
C++ :Change value from  DisableCMD registry 4 50
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

920 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

12 Experts available now in Live!

Get 1:1 Help Now