My first suggestion is to fix another application. In another application, the UTC offset with the date should be stored. If you try to solve the problem, you are just going to create more. For example, what happens when daylight saving time is on, then will the offsets change?
This is said and has no other choice - I would do something in these lines for the created_at field:
def created_at_in_eastern DateTime.parse(self.created_at.strftime("%D %T EST")) if self.created_at end
or you can use EDT depending on how the data is saved, just read the disclaimer at the top - it's a hack!
Geoff lanotte
source share