Where are you out of sync 12 hours. All I can see is a difference of 6 hours which in fact is exactly the offset between your timezone (America/Tegucigalpa (CST, -0600)) and UTC.
If you want to store timezone info with your timestamp you mustn’t use naïve date time.
Oh, I am sorry for the confusion. I said 12 hours because of the date change between ubuntu local time and navie date:
Local time: Sun 2017-12-03 19:59:00 CST
iex(2)> NaiveDateTime.utc_now()
~N[2017-12-04 02:09:28.813147]
Notice the local date is 3 and the Naive date is 4 so I assumed it was 12 hours.
My issue is that transactions will have a different date in some point of the day as this example shows. Also, the user interface shows the wrong date so I wanted to fix it adjusting the Date and Time properly.
Shall I adjust time manually before saving and showing to the user? or is there a more proper way to handle this types of issues?