Welcome Guest, Not a member yet? Register   Sign In
Save timestamp in database
#6

MySQL by default will use the system time zone internally but it's possible to define a different time zone
for the MySQL server globally or even per transaction. When you insert a date, it is not possible to define
the time zone along with the date string in MySQL. A date like '2013-11-10 00:00' refers to a point in time
since the epoch. You store it and you know what time zone your server is in. Then when you retrieve it, you
can make the necessary adjustments to transform that date form the server's time zone to the client's.

SEE: This MySQL Cheat Sheet

MySQL Timezone Cheatsheet
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Save timestamp in database - by omid_student - 05-03-2018, 06:01 AM
RE: Save timestamp in database - by InsiteFX - 05-03-2018, 09:00 AM
RE: Save timestamp in database - by omid_student - 05-03-2018, 09:50 AM
RE: Save timestamp in database - by InsiteFX - 05-03-2018, 11:12 AM
RE: Save timestamp in database - by omid_student - 05-03-2018, 11:52 AM
RE: Save timestamp in database - by InsiteFX - 05-04-2018, 03:58 AM
RE: Save timestamp in database - by omid_student - 05-04-2018, 07:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB