/    Sign up×
Community /Pin to ProfileBookmark

how can i convert unix time o time in php?

what is the fast way?

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@JonaApr 06.2005 — [font=trebuchet ms]Um, [url=http://www.php.net/date]date()[/url]?[/font]
Copy linkTweet thisAlerts:
@pelegk1authorApr 06.2005 — but i want to give the unix time and get the current date+month

!
Copy linkTweet thisAlerts:
@JonaApr 06.2005 — [font=trebuchet ms]Give the UNIX time to PHP and convert it to a human-readable date?[/font]
Copy linkTweet thisAlerts:
@the_treeApr 06.2005 — Jona, that is exactly what he was asking how to do.
Copy linkTweet thisAlerts:
@NogDogApr 06.2005 — [url=http://us2.php.net/manual/en/function.date.php]date()[/url]

[url=http://us2.php.net/manual/en/function.gmdate.php]gmdate()[/url]

[url=http://us2.php.net/manual/en/function.localtime.php]localtime()[/url]
Copy linkTweet thisAlerts:
@JonaApr 06.2005 — [font=trebuchet ms]I don't know about you, but I like to avoid wasting my time by making sure I know what I'm helping someone do before I write any code.[/font]
Copy linkTweet thisAlerts:
@ShrineDesignsApr 06.2005 — a unix timestamp is an integer, thus [code=php]<?php
$int = mktime(0, 0, 0, 1, 1, 1983);
echo date('m-d-Y', $int);
?>[/code]
×

Success!

Help @pelegk1 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.22,
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,
)...