Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-11-2003, 06:12 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
Linux time to standard mm/dd

code to convert linux time ( ex: 1060640800 ) to standard something like (this is wrong) August 10, 2003 or just August 10
Reply With Quote
  #2  
Old 08-12-2003, 02:47 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

PHP Code:
<?$time = ("Unix(Linux as you said) time code"); echo date ("Date time code, ie: Y i s"$time);?>
Example

PHP Code:
<?
$time 
= ("1060715196");
echo 
date ("Y i s"$time);
?>
Example would produce:

2003 06 14

Example 2

PHP Code:
<?
$time 
= ("1060715196");
echo 
date ("r"$time);
?>
Example 2 would produce:

Tue, 12 Aug 2003 21:06:14 +0200

Enjoy

I do hope you ment PHP, but im asuming because you said "Linux"
__________________
-1PARA-AlexKall

My photography website




Last edited by SilentTrigger; 08-12-2003 at 03:01 PM.
Reply With Quote
  #3  
Old 08-12-2003, 05:09 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
thanks man, i did mean unix/linux pretty much whats used, its from some date i think 1970, 01/01
Reply With Quote
  #4  
Old 08-12-2003, 05:14 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Correct!

The number of seconds from the UNIX Epoch

You can do it manualy and devide the seconds into days and then put that on to Jan 1 1970 But it would probebly not be that quick, and probebly not as acurret hehe
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #5  
Old 08-12-2003, 09:13 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
ack one prob, its displaying Wednesday 1969, December 31 the night/hour before said 'epoch' lol im not that old yet so thats not right lol

http://punksofwar.com/gn
Reply With Quote
  #6  
Old 08-13-2003, 09:17 AM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Then its probebly not seconds from the UNIX epoch your using...

Or you must be doing something wrong, I cant see what from looking at "Wednesday, Dec 31"


Code to generate unix timestamp
PHP Code:
date("U"); 
__________________
-1PARA-AlexKall

My photography website




Last edited by SilentTrigger; 08-13-2003 at 09:23 AM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mm atholon Humor & Jokes 1 12-27-2008 07:53 AM
MM live skinny killer General Chat 0 03-08-2008 01:01 PM
Windows MP, MM the Medicâ„¢ Tech Support 3 07-21-2005 04:33 PM
Ravage MM re: banner Steve Sigs and Graphics 12 10-16-2003 03:11 PM
MM Snipers ~Looking for recruits~ Ravage MM Gaming Talk 7 10-07-2003 09:15 PM


All times are GMT -5. The time now is 01:50 PM.




Powered by vBulletin®