From: Joerg Bruehe Date: March 1 2011 10:18pm Subject: Re: Convert unix time to 12:00 AM of that same day List-Archive: http://lists.mysql.com/mysql/224546 Message-Id: <4D6D70AC.3030801@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Hi Bryan, all! Bryan Cantwell wrote: > That's closer: > SELECT > UNIX_TIMESTAMP() + 86400 - (UNIX_TIMESTAMP() % 86400); > Gives me 6:00 PM today... The Unix timestamp is UTC-based (old name: GMT). You don't write which timezone you are using, but your notation "6:00 PM" makes me assume you are US-based. Is it 6:00 PM in your timezone at UTC midnight? Joerg -- Joerg Bruehe, MySQL Build Team, joerg.bruehe@stripped ORACLE Deutschland B.V. & Co. KG, Komturstrasse 18a, D-12099 Berlin Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven Amtsgericht Muenchen: HRA 95603