Jump to content
Sign in to follow this  
Kogmedia

unix time?

Recommended Posts

sandman

I don't know if it does, but here's some logic for converting it (UNIX time = military time right? if not, dont be mad please :))

If $time > 12 Then $newtime = $time =- 12 & " PM"

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites
PsaltyDS

No. Windows must have ctime functions available somewhere, but I don't know how you find them. Someone may have a UDF out that a quickie-search didn't find, but the native AutoIt functions don't do unix time.

Definition: Unix Time (Wikipedia)

P.S. I did come across an interesting VBScript example: VBScript Date-Time Conversions Class

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Kogmedia

I found this excel formula in one of my old doc I will give it a try :)

=UnixTime / 86400 + 25569

If $time > 12 Then $newtime = $time =- 12 & " PM"

Will convert 24hour time into 12 AM/PM

Unix time is

1165754109000, standard unix time - ie milliseconds since Jan 1 1970.

Edited by Kogmedia

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search

Share this post


Link to post
Share on other sites
sandman

Okay, sorry.. I didn't have any idea what UNIX time was, so I guessed :">


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites
Kogmedia

Never mind Sandman its better to try than not try at all :D

I will give the vbscript ago but ~ might be better to forget unix time all together :D

$unix = 1176755972
$new = $unix / 86400 + 25569
MsgBox(0,"Real Date/Time", $new)

Gave me 39188.860787037 now to make that a date/time :)

Edited by Kogmedia

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search

Share this post


Link to post
Share on other sites
Kogmedia

I found this but not total sure how to use it

#include <Date.au3>

; Calculated the number of seconds since EPOCH (1970/01/01 00:00:00) 
$iDateCalc = _DateDiff( 's',"1970/01/01 00:00:00",_NowCalc())
MsgBox( 4096, "", "Number of seconds since EPOCH: " & $iDateCalc )

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search

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  

×