search

Home  >  Q&A  >  body text

java - springboot returns wrong time

Configure the time zone according to what is said on the Internet. I have tried both upper and lower case. The time printed in the second picture is consistent with the database and is correct. However, after executing return, the time becomes eight. Hours, the database shows nine o'clock, and the response to me is five o'clock, and the database returns 1970-1-1 8:00 instead of 0 but 28800000

给我你的怀抱给我你的怀抱2775 days ago789

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-17 10:07:06

    The database time zone, Driver time zone, and Jackson serialization time zone must be consistent. If the Driver and database time zones are consistent without special settings, then your Jackson time zone configuration may be wrong.

    reply
    0
  • Cancelreply