I tried to do the following query to subtract one day from the given date: 

`DATE(FROM_UNIXTIME(UNIX_TIMESTAMP('2013-04-01') - 86400))`

which returns me 2013-03-30, but it should return 2013-03-31.

If i try to subtract one day of 2013-04-02, i get 2013-04-01 correctly returned.
Is this a date bug in mysql?