php - Store time in database -



php - Store time in database -

which best way store info come entire world? thinking, instance, store time() without timezone , convert every time.

could right? there method observe timezone of request?

for can save unix timestamp in database.

http://php.net/manual/en/function.time.php http://dev.mysql.com/doc/refman/5.5/en/datetime.html

returns current time measured in number of seconds since unix epoch (january 1 1970 00:00:00 gmt).

so every people have same timestamp format without timezone.

otherwise have store datetime field , timezone , calculate right value.

php timezone

Comments

Popular posts from this blog

Php operator `break` doesn't stop while -

ubuntu - Bash Script to Check That Files Are Being Created -

vim: Search & replace -