/    Sign up×
Community /Pin to ProfileBookmark

What time is it?

In the web script that I’m using, in the db table, under the column ‘time’ it shows, for example, 1533326208,
what time is that?

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@bastonesAug 07.2018 — It's a [url="https://stackoverflow.com/a/20823376"]unix timestamp[/url].
Copy linkTweet thisAlerts:
@NogDogAug 07.2018 — FYI:
``<i>
</i>21:29 $ php -a
Interactive shell

php &gt; echo date('Y-m-d H:i:s', 1533326208)."n";
2018-08-03 19:56:48<i>
</i>
``

?
Copy linkTweet thisAlerts:
@rootAug 07.2018 — It depends, is it an SQL time formatted field or is it a field that been set as a big int as some databases have stored their time stamps before now...

You also need to be aware of different systems and how they work with time references,.

1533326208 as a [url=https://www.unixtimestamp.com/index.php]unix stamp [/url] = 08/07/2018 @ 11:32am (UTC)

1533326208 as a [url=https://www.functions-online.com/date.html]PHP time base[/url] = 03.08.2018 21:56:48

So it is important to know what function is calculating time from this reference and its why a data should be stored as a datetime stamp in SQL format so that the database will at least have stored the correct time reference so that when an update or changes alter the time functions, the results will be the same and not altering the time reference.
×

Success!

Help @chrisjchrisj 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.13,
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,
)...