Unix/Epoch Timestamp to Readable Format, UTC/GMT Time?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
TheDewd
Posts: 1391
Joined: 19 Dec 2013, 11:16
Location: USA

Unix/Epoch Timestamp to Readable Format, UTC/GMT Time?

18 Sep 2014, 08:56

I really don't understand the major.minor.release.build versioning system well enough to use with confidence when releasing my scripts, so I decided to try using the Unix/epoch timestamp in the UTC/GMT time format instead.

My question is, how can I convert a Unix timestamp to a readable format? For example, 1411048064 --> Thu, 18 Sep 2014 13:47:44 GMT

http://www.epochconverter.com/ for more information
------------
I'm not 100% satisfied with this option, so I am still open to suggestions of other alternative versioning methods that would be universally recognizable and not timezone dependent.
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.
ahcahc
Posts: 110
Joined: 25 Jul 2014, 23:55

Re: Unix/Epoch Timestamp to Readable Format, UTC/GMT Time?

18 Sep 2014, 09:51

Code: Select all

now := A_NowUTC
EnvSub, now,1970, seconds
MsgBox % "epoch now: " now

epoch=1411048064
current := 1970
current += epoch, Seconds
FormatTime, timenow, %current%, yyyy-MMM-dd HH:mm:ss
MsgBox % "epoch: " epoch "`n" timenow
eabors

Re: Unix/Epoch Timestamp to Readable Format, UTC/GMT Time?

07 Apr 2018, 04:56

ahcahc wrote:

Code: Select all

now := A_NowUTC
EnvSub, now,1970, seconds
MsgBox % "epoch now: " now

epoch=1411048064
current := 1970
current += epoch, Seconds
FormatTime, timenow, %current%, yyyy-MMM-dd HH:mm:ss
MsgBox % "epoch: " epoch "`n" timenow
what do these do?
current += epoch, Seconds

epoch, seconds specifically have no idea what it does but it works, just trying to understand what im coding =p

Return to “Ask For Help”

Who is online

Users browsing this forum: artur1884, Google [Bot], Rohwedder, songdg, zavf and 30 guests