I was having the biggest problem dealing with time on my small weather app. I created the logic on my Rails backend to take the current time format that time object into a 12 hour format then return the formatted date string on the frontend of my app. This worked perfectly… until I deployed the application. I used the Heroku to deploy and host the app, but within the deployment I would gain 4 hours on my app giving my shiny cool new app the wrong time.
by doing this I by pass the backend, server, and Heroku which messed up the time on the app.
Now Forcast gif shows the right time and all is right in the word… for now.