There are two issues concerning the time difference at hand:
- Timezone - your local Debian system is running with your local timezone, whereas the EC2 instance is running with Coordinated Universal Time (UTC). The latter is pretty much the norm and resp. best practice for servers, you can adjust your local system via
sudo dpkg-reconfigure tzdata
(see Ynhockey's answer to How do I permanently reset the time zone in Debian?). - Precision - either one or both of your systems exhibit significant clock skew against UTC (both times should be identically after subtracting the timezone offset). This is easily remedied by installing a Network Time Protocol (NTP) daemon to Set the time automatically as explained in Debian's DateTime, which boils down to
sudo apt-get install ntp
and editing/etc/ntp.conf
to target more local NTP server sources for optimal results.