Jump to content
Sign in to follow this  
COMPAQ

How can i convert GMT to UTC time?

Recommended Posts

COMPAQ

How can i convert GMT to UTC time?

GMT To UTC

Thankyou. :)

Edited by COMPAQ

Share this post


Link to post
Share on other sites
BruceCopperField

How can i convert GMT to UTC time?

GMT To UTC

Thankyou. :)

http://en.wikipedia.org/wiki/Utc

In casual use, Greenwich Mean Time (GMT) is the same as UTC and UT1. Owing to the ambiguity of whether UTC or UT1 is meant, and because timekeeping laws usually refer to UTC, GMT is avoided in careful writing.

What kind of conversion are you looking for ?

Edited by BruceCopperField

Share this post


Link to post
Share on other sites
COMPAQ

Example

GMT : 2008/06/13 12:43

TO

UTC : 1213336282

Share this post


Link to post
Share on other sites
Malkey

Example

GMT : 2008/06/13 12:43

TO

UTC : 1213336282

Your UTC time looks more like a StarDate.

What does UTC stand for in Your time zone?

Share this post


Link to post
Share on other sites
ProgAndy

Could it be an Unix Timesatmp ?

Then use: http://www.therks.com/autoit/udfs/UnixTime.au3

Possibly, you have to change

-> $ptr_Time = DllCall('CrtDll.dll', 'ptr:cdecl', 'localtime', 'long*', $i_Timestamp) ; Local with summer + bias

To

-> $ptr_Time = DllCall('CrtDll.dll', 'ptr:cdecl', 'gmtime', 'long*', $i_Timestamp) ; GMT / UTC

MsgBox(0, '', _StringFormatTime("%Y/%m/%d %H:%M:%S",1213336282)) returns

with localtime: 2008/06/13 07:51:22

with gmtime: . 2008/06/13 05:51:22

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
rudi

Example

GMT : 2008/06/13 12:43

TO

UTC : 1213336282

This is NOT an UTC time! UTC's notation is like the 24h military time...

The difference between GMT (Greenwitch Mean Time) and UTC basically is the fact, that UTC is based on the SI normal Second, which is NOT equal to the average day's second. So the UTC time and the terrestrial "real time" aren't congruent. For sure you will remember, that time by time it's required, to insert (?or delete?) a second from the UTC time, so that it will match again the GMT.

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites
COMPAQ

Thank for your replies.

If you have others idea please let me know.

Yesterday i can did it at following below.

$UtcTime = (_DateDiff('s',"1970/01/01 00:00:00",_NowCalc()))*1000

It is change GMT to UTC.

Share this post


Link to post
Share on other sites
ProgAndy

NO !

This changes the Local time to Unix TimeStamp-Format in Milliseconds


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
rudi

Thank for your replies.

If you have others idea please let me know.

Yesterday i can did it at following below.

$UtcTime = (_DateDiff('s',"1970/01/01 00:00:00",_NowCalc()))*1000

It is change GMT to UTC.

What do you need to solve? Once again: What you call "UTC time" is NOT UTC at all. (The formula you have given is calculating the seconds sincd 01/01/1970).

Perhaps you could tell us where from you get that string you want to convert to GMT, and what you need to solve.

Regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.