Author |
Message |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sun Jan 05, 2003 11:13 am (21 years, 5 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
The Unix Timestamp Converter has been modified. It now not only converts timestamps to dates, but also converts dates to timestamps.
Please let me know if you have any trouble using it. |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Jan 06, 2003 6:11 pm (21 years, 5 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
very nice! You can also use it to find out what day of the week a certain date was on...I entered my birthday, then entered the resulting timestamp..and what d'ya know, it was a sunday! |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Jan 06, 2003 7:14 pm (21 years, 5 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
You don't even need to do that. Just enter your birthday in the date to timestamp zone, and you'll see the day of the week appear, like this:
Quote: | Date/Time translates to Timestamp |
|
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Mon Jan 06, 2003 7:15 pm (21 years, 5 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
heh...musta' missed that ![Rolling Eyes](/forums/images/smilies/icon_rolleyes.gif) |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
GingerNinja
Guest
![](images/guest.gif)
|
Posted:
Tue Jun 10, 2003 10:40 pm (21 years ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Would it be possible to use this tool to run a bulk job i.e. get it to query a text file of dates and output them into a new text file in UNIX time stamp format? |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![Find all posts by Anonymous Find all posts by Anonymous](templates/4WebHelp2/images/lang_english/icon_search.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 11, 2003 8:22 am (21 years ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Yes, as I've said before all this script does is use PHP's date functions. So it wouldn't be too difficult to write your own script. |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
Guest
![](images/guest.gif)
|
Posted:
Thu Sep 11, 2003 3:18 am (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
i'm sure a lot of people new to php would appreciate the source to your script though ![Smile](/forums/images/smilies/icon_smile.gif) |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![Find all posts by Anonymous Find all posts by Anonymous](templates/4WebHelp2/images/lang_english/icon_search.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Sep 11, 2003 4:26 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Here you go, I'll give you the code because I'm feeling nice today
Code: | <form name="stamp" method="get" action="timestamp.php">
<table width="100%" class="bodyline" cellpadding="3" cellspacing="1" border="0" class="bodyline">
<tr><td class="rowdel" style="height: 27px" align="center"><strong>Convert timestamps into dates:</strong></td></tr>
<tr><td class="row1" align="center">
<input type="hidden" name="action" value="stamp" />
<?
if ($_GET['action']=='stamp') {
$date = gmdate('l\, F j\<\s\u\p\>S\<\/\s\u\p\> Y\, G:i:s', $_GET['stamp']);
if ($date && isset($_GET['stamp'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #C0C0C0; padding: 5px; margin: 5px">'.$_GET['stamp'].' translates to <strong>'.$date.' (GMT)</strong></p>');
}
elseif (!isset($_GET['stamp'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> No timestamp was filled in.</p>');
}
else {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> "'.$_GET['stamp'].'" is not a valid timestamp.</p>');
}
}
?>
Timestamp: <input type="text" name="stamp" value="<? echo $stamp; ?>" size="11" maxlength="11" /> <i>(example: 1010342461)</i>
<br /><br /><input type="submit" value="Convert to a date" />
</td></tr>
</table>
</form>
<form name="date" method="get" action="timestamp.php">
<table width="100%" class="bodyline" cellpadding="3" cellspacing="1" border="0" class="bodyline">
<tr><td class="rowdel" style="height: 27px" align="center"><strong>Convert dates into timestamps:</strong></td></tr>
<tr><td class="row1" align="center">
<input type="hidden" name="action" value="date" />
<?
if ($_GET['action']=='date') {
$stamp = gmmktime($_GET['hour'],$_GET['minute'],$_GET['second'],$_GET['month'],$_GET['day'],$_GET['year']);
$new_date = date('l\, F j\<\s\u\p\>S\<\/\s\u\p\> Y\, G:i:s', $stamp);
if ($stamp && isset($_GET['hour']) && isset($_GET['minute']) && isset($_GET['second']) && isset($_GET['month']) && isset($_GET['day']) && isset($_GET['year'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #C0C0C0; padding: 5px; margin: 5px">'.$new_date.' (GMT) translates to <strong>'.$stamp.'</strong></p>');
}
elseif (!isset($_GET['day'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the day field.</p>');
}
elseif (!isset($_GET['month'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the month field.</p>');
}
elseif (!isset($_GET['year'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the year field.</p>');
}
elseif (!isset($_GET['hour'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the hour field.</p>');
}
elseif (!isset($_GET['minute'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the minute field.</p>');
}
elseif (!isset($_GET['second'])) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> Please fill in the second field.</p>');
}
elseif (!$stamp && $_GET['day']==01 && $_GET['month']==01 && $_GET['year']==1970 && $_GET['hour']==00 && $_GET['minute']==00 && $_GET['second']==00) {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #C0C0C0; padding: 5px; margin: 5px">'.$new_date.' (GMT) translates to <strong>0</strong></p>');
}
else {
echo ('<p style="border-style: dashed; border-width: 1px; border-color: #330066; background-color: #FC8E8E; padding: 5px; margin: 5px"><strong>Error:</strong> invalid date. Make sure you have filled in all fields in the correct format.</p>');
}
}
?>
<table border="0" cellpadding="1" cellspacing="0">
<tr><td>Day: </td><td><input type="text" name="day" value="<? echo $_GET['day']; ?>" size="2" maxlength="2" /> <i>(01-31)</i></td></tr>
<tr><td>Month: </td><td><input type="text" name="month" value="<? echo $_GET['month']; ?>" size="2" maxlength="2" /> <i>(01-12)</i></td></tr>
<tr><td>Year: </td><td><input type="text" name="year" value="<? echo $_GET['year']; ?>" size="4" maxlength="4" /></td></tr>
<tr><td>Hour: </td><td><input type="text" name="hour" value="<? echo $_GET['hour']; ?>" size="2" maxlength="2" /> <i>(00-23)</i></td></tr>
<tr><td>Minute: </td><td><input type="text" name="minute" value="<? echo $_GET['minute']; ?>" size="2" maxlength="2" /> <i>(00-59)</i></td></tr>
<tr><td>Second: </td><td><input type="text" name="second" value="<? echo $_GET['second']; ?>" size="2" maxlength="2" /> <i>(00-59)</i></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2"><input type="submit" value="Convert to a timestamp" /></td></tr>
</table>
</tr></td>
</table>
</form>
<p>© 2003, <a href="http://www.4webhelp.net/">4WebHelp</a></p> |
Released under the GPL license |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Thu Sep 11, 2003 7:45 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
since it's a legal requirement that you get a copy of the licence with the code, here's a link to it:
http://www.gnu.org/copyleft/gpl.html
(I was gonna post it instead of linking, but it was waaay longer than I thought ) |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Guest
![](images/guest.gif)
|
Posted:
Fri Sep 12, 2003 7:08 am (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
I wanted to register and say thanks but this software doesn't like me much lol
phpBB sure has one hell of an annoying sign-up system, i tried several times and am still not registered.
The reg code leaves a bit to be desired, for example your 0 and the O, no real indication of which one is which lol, anyway i'll try and register again later. As i seem to have made it mad
Quote: | You have exceeded the number of registration attempts for this session. Please try again later. |
|
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![Find all posts by Anonymous Find all posts by Anonymous](templates/4WebHelp2/images/lang_english/icon_search.gif) |
![](images/spacer.gif) |
Darren
Team Member
![](images/rank_6.gif)
![](images/avatars/gallery/computers/apple.gif)
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Fri Sep 12, 2003 8:14 am (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Guest wrote: | The reg code leaves a bit to be desired, for example your 0 and the O, no real indication of which one is which lol, |
the small print wrote: | Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it. | ![Wink](/forums/images/smilies/icon_wink.gif) |
|
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Darren Find all posts by Darren](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Fri Sep 12, 2003 1:25 pm (20 years, 9 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Let me know if you still have problems when you try again ![Smile](/forums/images/smilies/icon_smile.gif) |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
|