Monday 15 March 2010

datetime - How to make MySQL() NOW() function use client's timezone? -



datetime - How to make MySQL() NOW() function use client's timezone? -

i using now() function store date , time, server timezone ( own ) not work whole world.

what want now() utilize client timezone, whichever may be.

how can achieved?

now() executes on current execution timezone (db server timezone). can utilize convert_tz(dt,from_tz,to_tz) function along now() different timezone representation like

select convert_tz(now(),'gmt','est');

either way, unless determine tz info of client; @ db end, db server has no way determining that.

mysql datetime timezone

No comments:

Post a Comment