/    Sign up×
Community /Pin to ProfileBookmark

Getting time from website vs user

You know how the get time functions pulls info from the users computer? Is there a way i can get that same information from a web site or a clock on the the same web site?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@cbVisionJul 06.2010 — You can get the time from the website's server using PHP.

http://php.net/manual/en/function.time.php

I don't think you can get the web site (or servers) time using JavaScript. You need to use a server-side language.
×

Success!

Help @ZZY 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.19,
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,
)...