/    Sign up×
Community /Pin to ProfileBookmark

I was reading up on a tutorial on how to make one of those “Last Scene” scripts… As in, Hooded_Villian was last logged in 3 days ago.

Anyways… In the script, the guy uses a past date set in a variable, however, ehe said he stripped the date down and ended up with some numbers.

[code=php]$pastdate = 1209358800;//April 28 2008[/code]

How does one do that with a date? Is it like converting to a Hexidecimal number or is it something more sinister 😮

Thanks in Advance…

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@MindzaiFeb 25.2010 — http://en.wikipedia.org/wiki/Unix_time

[code=php]
echo strtotime("April 28 2008 06:00:00 am"); // 1209358800
echo date('F j Y h:i:s a', 1209358800); // April 28 2008 06:00:00 am[/code]
Copy linkTweet thisAlerts:
@Hooded_VillianauthorFeb 28.2010 — http://en.wikipedia.org/wiki/Unix_time

[code=php]
echo strtotime("April 28 2008 06:00:00 am"); // 1209358800
echo date('F j Y h:i:s a', 1209358800); // April 28 2008 06:00:00 am[/code]
[/QUOTE]


Thanks for that wiki link Mindzai. Very interesting... :-) Just another learning fact to add to the memory bank. Am going to have to opt for a memory chip implant/upgrade soon... LoL
Copy linkTweet thisAlerts:
@MindzaiFeb 28.2010 — Just make room for programming knowledge by clearing out unimportant stuff like remembering to eat and sleep ?
Copy linkTweet thisAlerts:
@Hooded_VillianauthorFeb 28.2010 — Just make room for programming knowledge by clearing out unimportant stuff like remembering to eat and sleep ?[/QUOTE]

I am learning that the hard way...

if(you_like_php == true) { sleep = none }

:-)
×

Success!

Help @Hooded_Villian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...