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

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -