I need help understand how mysql can determine what the timezone is when I use the function now() (in mysql) when I insert into mysql database. The datetime format is YYYY-MM-DD 00:00:00. How do you get the user to get the right time at their location?
Does this question make sense?
Thank you for your time!
now()is always refer to the server time from its timezone.If you have both server and user timezone,
it can be done via function
convert_tz,such as