Jump to content

How can i convert GMT to UTC time?


Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...