Time on linux
#1

Hi!
Is there a way to get a correct timestamp on linux?
I used this to get one weak back timestamp, but it was still incorrect:
Код:
new hour,minute,second;
new year, month,day;
new thetime, needtime;
gettime(hour, minute, second);
getdate(year, month, day);
thetime = mktime(hour,minute,second,day,month,year);
needtime = thetime-540600;
It showed me a timestamp of 15 (7+ days back.
When I use this to get the timestamp without any other functions then I get also 8 days back.
I'm not sure if I should simply add +8 days timestamp, dunno how it will effect after a while.
Reply


Messages In This Thread
Time on linux - by potato - 15.06.2009, 02:23
Re: Time on linux - by pen_theGun - 15.06.2009, 09:51
Re: Time on linux - by potato - 15.06.2009, 11:38

Forum Jump:


Users browsing this thread: 4 Guest(s)