Pop-Up Thingie
Sidebar
>>> Magnum BBS <<<
Home
Forum
Files
Dark
Log in
Username
Password
Sidebar
Forum
Usenet
COMP.LANG.XHARBOUR
Re: Unix Timestamp
From
Eduardo Motta
@21:1/5 to
All
on Sun Dec 5 14:14:35 2021
Enrico, I found a bug. The source code below has been corrected.
before correction:
UTOD("1638497277000-0300") // 03/12/2021 -1:07
after correction:
UTOD("1638497277000-0300") // 02/12/2021 23:07
New code:
STATIC FUNCTION UTOD( cSer )
LOCAL nSec := INT( VAL( cSer ) / 1000 )
LOCAL nMin := INT( nSec / 60 )
LOCAL nHou := INT( nMin / 60 )
LOCAL nDay := INT( nHou / 24 )
LOCAL nZon := VAL( RIGHT( cSer, 5 ) ) / 100
LOCAL cDat := DTOC( STOD( "19700101" ) + nDay )
Local nHours := nHou - nDay * 24 + nZon
LOCAL cMin := STRZERO( nMin - nHou * 60, 2 )
Local dDate := CtoD(cDat)
If nHours < 0
dDate--
nHours = nHours + 24
EndIf
RETURN DtoC(dDate) + " " + StrZero(nHours, 2) + ":" + cMin
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
From
Enrico Maria Giordano
@21:1/5 to
All
on Sun Dec 5 23:27:48 2021
Il 05/12/2021 23:14, Eduardo Motta ha scritto:
Enrico, I found a bug. The source code below has been corrected.
Thank you.
EMG
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
Who's Online
System Info
Sysop:
Keyop
Location:
Huddersfield, West Yorkshire, UK
Users:
113
Nodes:
8 (
1
/
7
)
Uptime:
28:33:56
Calls:
2,498
Files:
8,649
Messages:
1,905,886