Slade

msg:3766018 | 11:43 am on Oct 15, 2008 (gmt 0) |
[us.php.net...] | Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given. |
|
|
oddsod

msg:3766034 | 12:15 pm on Oct 15, 2008 (gmt 0) |
Thanks, Slade. I found that site earlier via Google. That quote is from their description of REQUEST_TIME. The page gives me a lot of technical info, parameters etc but - maybe I'm missing something obvious - there seems no info on easily converting 1223128964 to a human recognisable form. I'm not looking to setup some conversion on my site. I just want to convert a bunch of numbers I have in a text file.
|
coopster

msg:3766043 | 12:33 pm on Oct 15, 2008 (gmt 0) |
The examples on that page show you how to use the command. For example:
$time = 1223128964; print date('l, F j, Y g:i a', $time); // Saturday, October 4, 2008 2:02 pm
|
Anyango

msg:3766048 | 12:34 pm on Oct 15, 2008 (gmt 0) |
<? echo date("d-m-y",1223128964); ?> that ? or maybe i misunderstood, sorry if thats the case. Oops, Coopster got it a few seconds faster :) [edited by: Anyango at 12:36 pm (utc) on Oct. 15, 2008]
|
oddsod

msg:3766049 | 12:37 pm on Oct 15, 2008 (gmt 0) |
So I have to create a php file and put that code in? And keep changing the number in the code to convert each of them? I was hoping there would be some online utility somewhere - like the binary to hex converters - where I could type in each number and see what the associated date was. <added> Not to worry, I've tried creating the php file and it works so I'll do it that way. Thanks for all your help. [edited by: oddsod at 12:39 pm (utc) on Oct. 15, 2008]
|
coopster

msg:3766050 | 12:38 pm on Oct 15, 2008 (gmt 0) |
Yes, you could use a PHP script to process your text file. You could use the filesystem functions to open the text file and read through your timestamps and then print them out or write them out to a new file.
|
|