DigitalInnovation/go_raygun — pull request #11 by jdstuart (2014-11-21 01:12:29+00:00)
Title: Use RFC3339 as layout when sending error to Raygun

Raygun expect the time format to be in ISO8601 format. RFC3339 is similar to ISO8601, but more strict.

This fixes the following scenario.
Given a machine in Mountain Time (MST) (UTC -0700) with local date 2014-11-22T17:00:00
'''
1. time.Now().Format("2006-01-02T15:04:05Z") --> "2014-11-22T17:00:00Z"
2. time.Now().Format(time.RFC3339) --> "2014-11-22T17:00:00-07:00"
'''

1. Output the local MST time, but add Z at the end (meaning UTC). So it prints the local time as if it's in UTC time, but does not convert it to UTC time. This has an effect on how Raygun interprets the time. Raygun will now show that the error actually occurred 7 hours prior to it actually occurring.
2. Will output the time but add -0700 at the end. This will let Raygun correctly convert the occured on time.